This is my code: why does this end in a infinite loop? (the idea was to forward all IP's except 1).
RewriteEngine On
RewriteBase /
RewriteCond %{REMOTE_ADDR} !=91.198.106.118
RewriteCond %{REQUEST_URI} !^/page\.html$
RewriteRule ^(.*)$ http://domain.nl/i/page.html [R=307,L]
I think you should remove
^
from request_uriAssuming this is the same domain, you're redirecting everything to
/i/page.html
except/page.html
. Strip out/i/page.html
instead.Put this code in your .htaccess: