0

有人能看出这有什么问题吗?

Options +FollowSymlinks

Options -Indexes

RewriteEngine On 
RewriteRule ^random-number-generator$ random-number-generator.php [L] 
RewriteRule ^calculator$ calculator.php [L] 
RewriteRule ^currency-converter$ currency-converter.php [L] 
RewriteRule ^youtube-statistics$ youtube-statistics.php [L] 
RewriteRule ^check-website-status$ /check-website-status.php [L] 
RewriteRule ^your-ip-address$ your-ip-address.php [L] 
RewriteRule ^contact-us$ contact-us.php [L]

RewriteCond %{HTTP_REFERER} !^http://themegahouse.com/.*$ [NC] 
RewriteCond %{HTTP_REFERER} !^http://themegahouse.com$ [NC] 
RewriteCond %{HTTP_REFERER} !^http://www.themegahouse.com/.*$ [NC] 
RewriteCond %{HTTP_REFERER} !^http://www.themegahouse.com$ [NC] 
RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ http://themegahouse.com/restricted [R,NC,L]

ErrorDocument 401 /not-found.php 
ErrorDocument 403 /restricted.php 
ErrorDocument 404 /not-found.php

当我在浏览器中访问我网站的根目录时,我被禁止访问?

我确定是这个文件,因为当我删除它时,一切正常。

4

1 回答 1

0

您还需要允许空引用。将以下规则放在其他重写条件之前:

RewriteCond %{HTTP_REFERER} !^$
于 2012-05-25T05:38:19.933 回答