我的.htaccess文件中有以下代码:
上的RewriteEngine
RewriteCond%{HTTP_REFERER} sitetoblock.com [NC]
RewriteRule。* - [F]
目前,我的网站上显示的错误是
由于可能的配置错误,请求超出了10个内部重定向的限制。如有必要,使用'LimitInternalRecursion'来增加限制。
我在网上发现了几个地方的代码告诉我这很好,所以我做错了什么?
编辑:文件的其余部分如下所示:
AddOutputFilterByType DEFLATE text/html text/css application/javascript
# compress text, html, javascript, css, xml:
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
ExpiresActive On
ExpiresByType image/gif "now plus 1 month"
ExpiresByType image/png "now plus 1 month"
ExpiresByType image/jpeg "now plus 1 month"
ExpiresByType image/x-icon "now plus 1 month"
ExpiresActive On
ExpiresByType text/css "now plus 2 days"
ExpiresByType application/javascript "now plus 2 days"
ExpiresActive On
ExpiresByType text/html "now plus 5 minutes"
ExpiresByType text/plain "now plus 5 minutes"
# Block site
RewriteEngine on
RewriteCond %{HTTP_REFERER} sitetoblock\.com [NC]
RewriteRule .* - [F]