views:

13

answers:

1

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?

+1  A: 

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/.

Gumbo
thanks gumbo, this looks like excellent advice
Haroldo
ha, i hadn't thought about excluding the holding page from the rule, that would have been a classic!
Haroldo