trickyidiot
asked on
mod_rewrite not redirecting!
RewriteEngine On
RewriteRule ^/automobiles(/)$ /index.php?view=autos [R=301,NC,QSA,L]
This should take http://www.example.com/automobiles and point it to http://www.example.com/index.php?view=autos, no?
RewriteRule ^/automobiles(/)$ /index.php?view=autos [R=301,NC,QSA,L]
This should take http://www.example.com/automobiles and point it to http://www.example.com/index.php?view=autos, no?
ASKER
Got a big fat internal server error on that one
here's the full set of code from httpd.conf:
here's the full set of code from httpd.conf:
<Directory />
Options FollowSymLinks
AllowOverride All
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
#RewriteRule ^/automobiles/?$ /index.php?view=autos [NC,L]
#RewriteRule ^/computing/?$ /index.php?categoryID=2953 [NC,L]
#RewriteRule ^/electronics/?$ /index.php?categoryID=2721 [NC,L]
#RewriteRule ^/mac/?$ /index.php?categoryID=2720 [NC,L]
#RewriteRule ^/memory/?$ /index.php?categoryID=5013 [NC,L]
#RewriteRule ^/mobilecomputing/?$ /index.php?categoryID=2719 [NC,L]
#RewriteRule ^/officesupplies/?$ /index.php?categoryID=3816 [NC,L]
#RewriteRule ^/traveler/?$ /index.php?view=traveler [NC,L]
RewriteRule ^(.*)$ /index.php?action=OldLinkConversion&queryString=$1 [QSA,L]
</IfModule>
</Directory>
ASKER
I have the rules commented out as they caused the internal server error
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
nail, head, some smashing involved - good carpenter.
RewriteEngine On
RewriteRule ^/automobiles/?$ /index.php?view=autos [R=301,NC,QSA,L]
or in .htaccess files:
RewriteEngine On
RewriteRule ^automobiles/?$ /index.php?view=autos [R=301,NC,QSA,L]
/? stands for 0 or 1 slash. If you don't want an external redirect, drop "R=301," from the flags