Forum Moderators: phranque
RewriteEngine on
RewriteBase /
#
# Externally redirect direct client requests for script filepath+query to new SEF URL
RewriteCond %{THE_REQUEST} ^[A-Z]+\ /products\.php\?idCategory=2\ HTTP/ [NC]
RewriteRule ^products\.php$ http://www.example.com/trolleys/? [NC,R=301,L]
#
# Externally redirect to add a trailing slash back of the trolleys
RewriteRule ^trolleys$ http://www.example.com/trolleys/ [NC,R=301,L]
#
# Internally rewrite SEF URL-path requests to script+query
RewriteRule ^trolleys/$ /products.php?idCategory=2 [NC,L]