Posted By

BFTrick on 09/15/10


redirect htaccess ip

Versions (?)

Who likes this?

2 people have marked this snippet as a favorite


Redirect all external traffic to a temp page

 / Published in: Apache


This code redirects all external traffic (all traffic not belonging to a particular ip) to a temp page. This is useful for performing site maintenance.

  1. Options +FollowSymlinks
  2. RewriteEngine on
  3. RewriteCond %{REMOTE_HOST} !^123\.45\.67\.89
  4. RewriteCond %{REQUEST_URI} !/alternate_page\.html$
  5. RewriteRule \.html$ /alternate_page.html [R=302,L]

Report this snippet  

You need to login to post a comment.