Statamic htaccess and accessing admin folder on MAMP

849 Views Asked by At

I just installed Statamic CMS. I went with the normal install, and I copied in their suggested .htaccess. For some reason when I try to access http://mysiteurl.dev/admin I get a 403 Forbidden error.

What in the .htaccess file is causing this, and how can I rewrite it so it works?

# 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]
1

There are 1 best solutions below

0
On

Try removing the trailing slashes rule.