所以我需要一个htaccess重定向来排除我的ip?
您可以检查删除地址:
RewriteCond %{REMOTE_ADDR} !=12.345.67.89 RewriteRule !^maintanence$ maintanence [L]
您可能还想排除其他文件,如图像、样式表等:
RewriteCond %{REMOTE_ADDR} !=12.345.67.89 RewriteRule !^(maintanence$|images/|style/) maintanence [L]
这将重写其URL路径不是 /maintanence 还是从 /images/ /style/
/maintanence
/images/
/style/