At some point through my error my localhost started getting redirected. After reading around I added RewriteCond !localhost [NC] to my .htaccess file and it now appears to work but I’ve pretty much no idea what I’m doing.
I don’t know htaccess rules well, I’ve read several answers and googled but the scripts I’ve found seem to take a different approach usually based around…
Require valid-user
Allow from 127.0.0.1
Satisfy Any
…which I have trouble integrating.
Is my amend below OK or a bad idea?
# MAINTENANCE-PAGE REDIRECT
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REMOTE_ADDR} !^00\.00\.000\.000 # my remote IP address
RewriteCond !localhost [NC] # I added this line
RewriteCond %{REQUEST_URI} !/maintenance.html$ [NC]
RewriteCond %{REQUEST_URI} !\.(jpe?g?|png|gif|css|zip) [NC]
RewriteRule .* /maintenance.html [R=302,L]
</IfModule>
I would suggest you to remove these lines
and add just this:
But the
Solution is much better.