Today's task was to redirect all pages from an old domain to new domain except one page (google verification file). All pages including any query string should be stripped out and redirect to only homepage of new domain with out any query string.
This code snippet on htaccess did all the tricks:
<IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{ENV:REDIRECT_STATUS} ^$ RewriteCond %{REQUEST_URI} !^/googleace438179b7ee2497.html$ [NC] RewriteCond %{HTTP_HOST} ^(www\.)?technooze\.com$ [NC] RewriteRule (.*)$ http://www.dltr.org/? [R=301,L] </IfModule>
charles posted on - Thursday 27th of June 2013 10:37:17 PM