- Sep 17, 2008
- 6,037
- 3,974
Hey guys I have been having this annoying problem today and despite years of handling redirects I am just having a complete blank with this one.
I am wanting to do a redirect so that the page below:
http://domain.com/?someText
to
http://domain.com/someText
and also need it to act as below
http://domain.com/someText?someMoreText
to
http://domain.com/domeTextsomeMoreText
Essentially pulling out the ? character wherever it appears in the url.
I have tried the rule below and many many variations of it but I am just being a big idiot about this.
RewriteRule ^\?(.*)$ $1 [NC,L] #this is for the first variation
RewriteRule ^\(.*)?(.*)$ $1 [NC,L] # for the second variation
Any advice on how this may be achieved would be very appreciated.
Thanks guys.
I am wanting to do a redirect so that the page below:
http://domain.com/?someText
to
http://domain.com/someText
and also need it to act as below
http://domain.com/someText?someMoreText
to
http://domain.com/domeTextsomeMoreText
Essentially pulling out the ? character wherever it appears in the url.
I have tried the rule below and many many variations of it but I am just being a big idiot about this.
RewriteRule ^\?(.*)$ $1 [NC,L] #this is for the first variation
RewriteRule ^\(.*)?(.*)$ $1 [NC,L] # for the second variation
Any advice on how this may be achieved would be very appreciated.
Thanks guys.
Last edited: