Nick_72
asked on
mod_rewrite and .htaccess again...
Hi,
I would appreciate help on this one.
What I want to do is to translate everything after the main url into a parameter.
for example:
http://www.thesite.com/abc
http://www.thesite.com/bcd
http://www.thesite.com/cde
should all be redirected to
http://www.thesite.com
with the respective end of the url transfered as a parameter. It doesn't matter if it's the parameter name, or the value of some named parameter.
Now, when I've tried to do it myself, all that happens is that I get caught in an infinite loop to the main url, not very surprisingly.
So what I also need is a condition that checks if the url contains a questionmark '?'. In that case the request should not be redirected.
I'm a pure novice to mod_rewrite so I really need help from you guys!
Thanks,
Nick
I would appreciate help on this one.
What I want to do is to translate everything after the main url into a parameter.
for example:
http://www.thesite.com/abc
http://www.thesite.com/bcd
http://www.thesite.com/cde
should all be redirected to
http://www.thesite.com
with the respective end of the url transfered as a parameter. It doesn't matter if it's the parameter name, or the value of some named parameter.
Now, when I've tried to do it myself, all that happens is that I get caught in an infinite loop to the main url, not very surprisingly.
So what I also need is a condition that checks if the url contains a questionmark '?'. In that case the request should not be redirected.
I'm a pure novice to mod_rewrite so I really need help from you guys!
Thanks,
Nick
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
http://www.devshed.com/c/a/Apache/Search-Engine-Friendly-URLs-with-mod-rewrite/