Link to home
Start Free TrialLog in
Avatar of jbrashear72
jbrashear72

asked on

301 redirect not working in .htaccess how do I?

I am trying to do a redirect in htaccess but the rule is being ignored.
redirect 301 /index.php?pid=12 http://www.illumitex.com/

I know it works bc I have this code and it redirect the domain to www:
RewriteCond %{HTTP_HOST} !^www\.illumitex\.com [NC]
RewriteRule ^(.*)$ http://www.illumitex.com/$1 [R=301,L]


What I am trying to do is force some spacific older pages back to the main index page or just / .

I have also  tried:
rewriterule index.php?pid=165 http://www.illumitex.com/ [R=301,L]
But that is not working either.
What am I doing wrong?

Avatar of Amick
Amick
Flag of United States of America image

A question mark is a special character that should be escaped:
index.php\?pid=12
ASKER CERTIFIED SOLUTION
Avatar of LinuxNinja
LinuxNinja
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial