我刚刚安装了 Statamic CMS。我进行了正常安装,并复制了他们建议的 .htaccess。出于某种原因,当我尝试访问http://mysiteurl.dev/admin时,我收到 403 Forbidden 错误。
.htaccess 文件中的什么导致了这种情况,我该如何重写它才能正常工作?
# Kick off base settings
RewriteEngine On
RewriteBase /
DirectorySlash Off
# Protect your system files
RewriteRule ^(_content) - [F,L]
RewriteRule ^(.*)?\.yml$ - [F,L]
Rewriterule ^(.*)?\.yaml$ - [F,L]
Rewriterule ^(.*)?\.html$ - [F,L]
RewriteRule ^(.*/)?\.git+ - [F,L]
# Remove trailing slashes
RewriteRule ^(.*)\/(\?.*)?$ $1$2 [R=301,L]
# Remove index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php [QSA,L]