I'm trying to get all the dynamic links like these: mysite.com/index.php?id=1 mysite.com/index.php?id=2 mysite.com/index.php?id=3 etc. to 301 redirect to: mysite.com Any help would be appreciated. Thanks.
Try this in .htaccess: RewriteEngine on RewriteCond %{QUERY_STRING} ^id= RewriteRule ^index\.php$ http://www.my_site.com/? [L,R=301] Code (markup): I believe that Isaak's suggestion is going to give a 302 redirect. Jean-Luc
Just an FYI. This is what I finally got to work: RewriteCond %{QUERY_STRING} ^id=([0-9]+)$ [NC] RewriteRule ^index.php$ [url]http://www.mysite.com/page.php?id=%1[/url] [R=301,L] Code (markup): Thanks for the help.