RewriteEngine On
#Block ip
RewriteCond %{http:X-Forwarded-For}&%{REMOTE_ADDR}&%{http:X-Real-IP} !(127.0.0.1|8.8.8.) [NC]
RewriteRule (.*) – [F]
</IfModule>
問:我需要你們幫我做
答:您好,1、已經為您添加,相關ip,請自行到對應的文件管理.htaccess文件中進行添加,不同的ip端請使用 “|”分隔開即可,非常感謝您長期對我司的支持!
問:我把可以訪問你的IP段給你們 你們幫我反向添加進去
答:您好,1、不清楚您需要添加哪些ip段,您可以在.htaccess文件中進行添加即可RewriteCond %{http:X-Forwarded-For}&%{REMOTE_ADDR}&%{http:X-Real-IP} !(127.0.0.1|8.8.8.|允許訪問的ip) [NC],使用 “|”分隔開即可,非常感謝您長期對我司的支持!
問:幫我看下我的虛擬機上的.htaccess文件創建位置是否正確
答:您好,1、沒有查看您創建了錯誤位置,對應的文件需要放置到www目錄中,之前已經為您創建,您只需要進行添加即可,非常感謝您長期對我司的支持!
問:127.0.0.1 |127.0.0.1| 127.0.0.1/14 這種樣子去添加
還是這樣127.0.0.1 |127.0.0.1 這樣順著代碼添加進去的時允許訪問的IP?
答:您好,不能添加127.0.0.1和127.0.0.1/14,116.86. 表示116.86.*.* 的ip段,請添加 116.86. |127.0.0.1,非常感謝您長期對我司的支持!
問:這樣加進去的IP是允許訪問的還是不允許訪問的
答:您好,請修改/www/.htaccess ,規則 !(127.0.0.1|8.8.8.)前面加了感嘆號表示允許訪問的ip,去掉感嘆號表示不允許訪問的ip,非常感謝您長期對我司的支持!
問:你好,幫我看一下是不是這么添加 是不是允許訪問的
答:您好,規則中183.0.和112.0.請修改為183.和112. ,其他正確的。同時不能在www外創建.htaccess,會影響,已幫您刪除www外的.htaccess,非常感謝您長期對我司的支持!
問:操作后網站打不開了
Internal Server ErrorThe server encountered an internal error or misconfiguration and was unable to complete your request.Please contact the server , webmaster@mesesfx888 and inform them of the time the error occurred, and anything you might have done that may have caused the error.More information about this error may be available in the server error log.Apache Server at hkmesesfx.com Port 80
答:您好,
出現這個錯誤一般是htaccess規則語法有錯導致,現在看您已經刪除了www內的htaccess文件,您可以恢復文件我們檢查下,非常感謝您長期對我司的支持!