0
我剛剛安裝了Statamic CMS。我進行了正常的安裝,然後複製了他們建議的.htaccess。由於某些原因,當我嘗試訪問http://mysiteurl.dev/admin時,出現403 Forbidden錯誤。Statamic htaccess和訪問MAMP上的管理文件夾
.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]
認爲我得到它的工作,但我確實沒有。所以,如果有人知道,我仍然很想知道! – jthomas