I am having some difficulty redirecting links. Here is a simple example and I hope you can tell me what I am missing that is causing it to fail.
RewriteCond %{QUERY_STRING} NAV=PIXIES
RewriteRule ^/category.asp?NAV=PIXIES /category/pop-artpixies-trade- [R=301,L,NE]
Please let me know what further information I can provide.
the query string isn’t included in the URI for matching in the
RewriteRuledirective:If this is inside an .htaccess file, you need to remove the leading slash in your regexp match:
If you want to actually remove the
NAV=PIXIESfrom the query string (because the above rule will rewrite http://domain/category.asp?NAV=PIXIES to http://domain/category/pop-artpixies-trade-?NAV=PIXIES ) then you need to add a “?” to the end of your target: