How to make a url rewrite rule exception

mod-rewriterewrite

I have a bunch of rewrite rules to redirect visits from domainX to domainY, however now I want show an index.html page when people visit domainX, but I still want all the other rewrite rules to apply.

I read on stackoverflow that I can just add something like this at the top:

RewriteRule  ^index.html  -  [L]

However it's not working. I'm not sure why. Any suggestions?

NOTE: Current rewrite config file is available here.

Best Answer

This would be my solution:

RewriteCond %{HTTP_HOST} ^(.*)whiterabbitpress.com$ [NC]
RewriteCond %{REQUEST_URI} !^/index.html$ [NC]
RewriteRule ^new-arrivals.html$ http://shop.whiterabbitjapan.com/japanese-language/new-arrivals.html [L,R=301]
[...]

This means that all the following rules will only be used when the hostname is *.whiterabbitpress.com, and the path is not /index.html.

Kudos to you for posting the actual config instead of munging it, it really makes it a great deal easier to help!