0

在我的本地开发环境中,我想允许目录中没有索引文件的目录列表。

这工作正常,直到我添加我的 .htaccess(用于删除我的 CMS 上的 index.php)文件,看起来像这样

RewriteEngine On

RewriteRule ^(_app) - [F,L]
RewriteRule ^(_config) - [F,L]
RewriteRule ^(_content) - [F,L]
RewriteRule ^(.*).yml$ - [F,L]
RewriteRule ^(.*).yaml$ - [F,L]
RewriteRule ^(.*).html$ - [F,L]
RewriteRule ^(.*/)?\.git+ - [F,L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php [QSA,L]

我收到 403 禁止错误。

关于如何覆盖的任何想法?

4

1 回答 1

0

嗨,只需打开扩展选项卡上的索引,指令选项,它就可以工作。

MAMP PRO 主机面板

于 2015-06-24T10:09:54.060 回答