【发布时间】:2017-06-16 08:42:35
【问题描述】:
我真的不是.htaccess 的专家,我可以远程访问托管已经运行的php 网站的apache 服务器。我想创建一个data 文件夹并授予它公共访问权限。现在,当我运行 http://thewebsite.com/data 时出现 403 错误。我检查了没有问题的权限,我推断这个错误一定与.htaccess有关
Options -Indexes
DirectoryIndex index.php
<IfModule mod_rewrite.c>
RewriteEngine On
#RewriteBase /
RewriteCond %{REQUEST_URI} ^(.*)//(.*)$
RewriteRule . %1/%2 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^.*$ index.php?qa-rewrite=$0&%{QUERY_STRING} [L]
有没有办法通过一些 .htacess 规则来解决这个 403 错误?
【问题讨论】:
标签: php apache .htaccess permissions http-status-code-403