Want to redirect all visitors except for me
问题 Basically I'm about to start work on a site and I'd like something that I can add into my .htaccess file (or elsewhere) that'll work like this pseudo code: (my ip will be in place of 127.0.0.1) if (visitors_ip <> 127.0.0.1) redirectmatch ^(.*)$ http://www.example.com/under-construction.html Hopefully that makes sense... 回答1: That would be something like: RewriteEngine On RewriteBase / RewriteCond %{REMOTE_ADDR} !^127\.0\.0\.1 RewriteCond %{REQUEST_URI} !/mypage\.html$ RewriteRule .* http:/