I'm about to launch the latest version of my webapp and would like to ensure all visitors are redirected to a holding page while i make the transition.
So i need an htaccess redirect that excludes my ip somehow?
I'm about to launch the latest version of my webapp and would like to ensure all visitors are redirected to a holding page while i make the transition.
So i need an htaccess redirect that excludes my ip somehow?
You could check the remove address:
RewriteCond %{REMOTE_ADDR} !=12.345.67.89
RewriteRule !^maintanence$ maintanence [L]
You also might want to exclude other files like images, stylesheets, etc.:
RewriteCond %{REMOTE_ADDR} !=12.345.67.89
RewriteRule !^(maintanence$|images/|style/) maintanence [L]
This will rewrite any request that’s URL path is either not /maintanence
or does start with /images/
or /style/
.