How can I .htaccess 301 redirect all pages/files (EXCEPT FOR ONE) to new domain?
I have already made an .htaccess file that successfully redirects most all the different pages and files on my old domain (
www.olddomain.com) to my new domain (
www.newdomain.com).
HOWEVER, I need one page to NOT be redirected to the new site, that page is the google verification .html file:
Code:
http://www.olddomain.com/googleverification.html
.
I have attached the most relevant parts of the file are pasted below:
---------RELEVANT PARTS OF THE .HTACCESS FILE---------
Code:
RewriteEngine On
RewriteCond {HTTP_HOST} ^olddomain.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.olddomain.com$
RewriteRule ^(.*)$ http://www.newdomain.com/$1 [L,R=301]
RewriteCond %{REQUEST_URI} !\.(php|html?|jpg|gif|png|pdf|tiff|bmp|ico|gz|zip|xml|txt)$
RewriteRule ^(.*)([^/])$ http://www.newdomain.com/$1$2/ [L,R=301]
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress