繁体   English   中英

PHP Kohana。 htaccess似乎正在阻止访问子文件夹。

[英]PHP Kohana. Htaccess seems to be preventing access to subfolder.

我在网站上遇到问题,似乎我的htaccess文件(位于Web根目录中)阻止访问子目录中的任何php文件。 我已经通过创建一个新的测试文件夹并向其中添加一个简单回显的php文件进行了测试。 我总是遇到500错误。

这个问题只是最近才开始发生。 我拥有的htaccess规则与我在自己的服务器上运行的许多其他站点相同,但是该站点由另一家公司托管。 有谁知道为什么会这样? 服务器上的更改可能导致了这种情况吗?

这是我的htaccess文件:

<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript
</IfModule>

# Turn on URL rewriting
RewriteEngine On

# Put your installation directory here:
# If your URL is www.example.com/kohana/, use /kohana/
# If your URL is www.example.com/, use /
RewriteBase /

# Protect application and system files from being viewed
RewriteCond $1 ^(app_admin|app_public|system)

# Rewrite to index.php/access_denied/URL
RewriteRule ^(.*)$ index.php/access_denied/$1 [PT,L]

# Do not enable rewriting for other files that exist
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

# Rewrite to index.php/URL
RewriteRule ^(.*)$ index.php/$1 [PT,L]

Options -Indexes

请参阅ServerFault中的讨论 绝对是权限问题。 在每次讨论中,请确保父文件夹也具有适当的权限,否则Apache无法进入带有.htaccess文件的文件夹以进行读取。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM