Jump to content

Strange URL things ..


Recommended Posts

I use this rewrite rule to automatically add the "www" in front of my domain...

 

    
RewriteCond %{HTTP_HOST} !^www\.site\.com$ [NC]
   RewriteRule .? http://www.site.com%{REQUEST_URI} [R=301,L]

 

.. I have loads and loads of RewriteRules .... I have the url http://www.site.com/users/1 to show a users profile... but if I go to..notice the NO "www".... http://site.com/users/1 it ends up showing "http://www.site.com/users/1?id=1" in the URL! because the "/users/#" RewriteRule shows "/userProfs/?id=#" so going to http://www.site.com/users/1 is the same as going to http://www.site.com/userProfs/?id=1 ... but it ADS the ?id=1 to the re-written URL if i dont have the "www" in front.... any ideas!?

 

BASICALLY:

... going here: http://site.com/users/1

rewrite's to http://www.site.com/users/1?id=1 when it SHOULD rewrite to http://www.site.com/users/1

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.