Here is an interesting case:
Google has indexed my test folder content and I am trying to convince it to recrawl the test folder I setup the redirection rules as follows:
RewriteBase /
RewriteRule ^test/(.*) [
head-massage.net...] [R=301,L]
This works perfectly.
Now I would like to submit a sitemap.xml to google to make it more enticing for it to crawl the test folder and follow the redirection rules.
This brings two little problems, I need to redirect everything else but /test/sitemap.xml and I need to be exempted from the redirection so I can make administrative changes, like generating the sitemap.
Here is what I have done and it doesn't work:
RewriteBase /
# RewriteCond %{REQUEST_URI} !^test/sitemap.xml [NC]
RewriteCond %{REQUEST_URI} !test/sitemap.xml
RewriteCond %{REMOTE_HOST} !^111.111.111.*
RewriteRule ^test/(.*) [
head-massage.net...] [R=301,L]
Whith the code above I am still redirected from my IP and the sitemap.xml is still redirected to the main site.