I'm trying to do a rewrite using the following code; RewriteRule ^index.asp?PageAction=VIEWPROD&ProdID=2$ /foot-350mhz-patch-cable-p-26169.html [L] Code (markup): It's basically an old ecommerce site link and I want to point it the new link so I keep as much of the search engine traffic for the old links as possible. I want index.asp?PageAction=VIEWPROD&ProdID=2 to redirect to foot-350mhz-patch-cable-p-26169.html Any ideas why the redirect isn't working. All the other blurb before the rewrite is correct because I have other redirects which are working correctly.
RewriteRule ^index\.asp?PageAction=VIEWPROD&ProdID=2$ http://www.DOMAIN.com/foot-350mhz-patch-cable-p-26169.html [R=301,L] Odds are, it won't work, being a dynamic URL that it's redirecting from. Run over to webmasterworld.com/apache/ where da REAL mod_rewrite master lives!!! I had to add some RewriteCond %{QUERY_STRING} ^ code to redirect a vBulletin thread URL to another thread URL.
Thanks Nintendo. I managed to write the solution myself using the rewrite condition just have you have stated on your reply post.