首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >我的.htaccess出了什么问题?

我的.htaccess出了什么问题?
EN

Stack Overflow用户
提问于 2012-05-25 13:35:36
回答 1查看 66关注 0票数 0

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

代码语言:javascript
复制
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

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

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

EN

回答 1

Stack Overflow用户

发布于 2012-05-25 13:38:20

你也需要允许空的引用。将以下规则放在其他重写秒之前:

代码语言:javascript
复制
RewriteCond %{HTTP_REFERER} !^$
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/10748983

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档