0
在某些时候,通过我的错误,我的本地主机开始重定向。在阅读后我添加了RewriteCond !localhost [NC]
到我的.htaccess文件,它现在似乎工作,但我几乎不知道我在做什么。htaccess重定向本地主机免除
我不知道htaccess的规则很好,我读过一些答案,一派但我发现脚本似乎采取了不同的方法通常在基于...
Require valid-user
Allow from 127.0.0.1
Satisfy Any
...我很难整合。
下面是我的修改还是坏主意?
# MAINTENANCE-PAGE REDIRECT
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REMOTE_ADDR} !^00\.00\.000\.000 # my remote IP address
RewriteCond !localhost [NC] # I added this line
RewriteCond %{REQUEST_URI} !/maintenance.html$ [NC]
RewriteCond %{REQUEST_URI} !\.(jpe?g?|png|gif|css|zip) [NC]
RewriteRule .* /maintenance.html [R=302,L]
</IfModule>
好吧,这就解释了为什么我经常看到有效用户的方法。我前段时间使用了一个指南,但是如果可以的话,我会尽量用您的建议来替换它。感谢您花时间提供帮助。 – edwinbradford 2012-02-17 17:29:14
@edwinbradford欢迎 – ThinkingMonkey 2012-02-17 22:09:06