View Full Version : redirect

09-21-2009, 05:47 PM

i would like to update my wordpress blog, but i want to put in place a re direction so all the people are redirected to a page that says"come back later", but not myself my ip must not be redirected as i need to be watching the changes i do. how can i do that?

09-21-2009, 06:11 PM
Add this to your .htaccess file to display the "come back" page within the current URL, hiding the location of the comebacklater.html file:

# If not from, show /comebacklater.html
RewriteCond %{REMOTE_ADDR} !^123\.45\.67\.890$
RewriteRule .* /comebacklater.html [L]

To physically redirect to the "come back" page:

# If not from, redirect to /comebacklater.html
RewriteCond %{REMOTE_ADDR} !^123\.45\.67\.890$
RewriteRule .* /comebacklater.html [R=302,L]

09-21-2009, 07:50 PM
hi, thank you. so this is apache? it wont work on a IIS server ?

09-21-2009, 08:06 PM
Sigh. Is this for IIS? You failed to mention that in your original message... would have been helpful.

Place this code at the very top of your root index file:

if ( '' != $_SERVER['REMOTE_ADDR'] )
readfile( 'comebacklater.html' );

Make sure comebacklater.html is in the same folder as the index file.

09-21-2009, 09:48 PM
yep, sorry for that. thanks a lot .