mod_rewrite During Site Maintenance by IP Address

Firstly, if you are not using SSL for all your sites, you should step it up! NameCheap's SSL certificates start at only $9. There's no excuse!
Firstly, if you have not tried Digital Ocean's SSD Virtual Servers for only $5/mo, I highly recommend them!

If you are performing site maintenance, you can redirect all users to a maintenance page while letting yourself through by IP address:


# If user IP is NOT, then redirect to maintenance.html
# (Don't forget to escape the dots)
RewriteCond %{REMOTE_ADDR} !123\\.123\\.123\\.123
RewriteRule .* /maintenance.html [L]

About this entry

Good Reads