Results 1 to 2 of 2
Hi There,
We have a website that has pages which dont exist any more and i'm trying to redirect the old link to the homepage. This works for most rules ...
- 03-16-2010 #1Just Joined!
- Join Date
- Mar 2010
- Posts
- 1
Using question marks in mod_rewrite (query_string)
Hi There,
We have a website that has pages which dont exist any more and i'm trying to redirect the old link to the homepage. This works for most rules but once I include a ? in the link it doesnt work.
Due to being a new member I cant post links heh, so [link] is where im placing my link i want to be redirected too
Heres and example of a working one I have:
Now as soon I do something like this:Code:RewriteRule ^email-marketing\.php$ [link] [R=301,L]
it doesnt pick it up / work. I cannot find anything helpful in the log eitherCode:RewriteRule ^index\.php\?page=contact$ [link]
Ive also tried this that doesnt work:
this does also not work.Code:RewriteCond ${QUERY_STRING} =^index.php?page=contact$ RewriteRule ^index\.php\?page=contact$ [link]
Im sure i'm missing something simple here. Any help / advice would be greatly appreciated
- 03-24-2010 #2
actually your last rewrite condition is not quite correct it should look more like
the options at the end are adjustable YMMV. does that help any?Code:RewriteCond %{QUERY_STRING} page=contact RewriteRule ^index\.php [link] [NE,R=301]linux user # 503963


Reply With Quote