Categories
How to write a redirect exception in htaccess?
RewriteCond %{ENV:REDIRECT_STATUS} ^$ RewriteRule !(^$|.*\.(css|jpg|gif|ico)) / [R=301,L]
Answer the question
In order to leave comments, you need to log in
RewriteCond %{ENV:REDIRECT_STATUS} ^$ RewriteCond %{REQUEST_URI} !^/index2\.html RewriteRule !(^$|.*\.(css|jpg|gif|ico)) / [R=301,L]
RewriteCond %{ENV:REDIRECT_STATUS} ^$ RewriteRule !^($|index2\.html|.*\.(css|jpg|gif|ico)) / [R=301,L]
Didn't find what you were looking for?
Ask a Question
731 491 924 answers to any question