# Turn on the Rewrite Engine
RewriteEngine On
# If you're running in a subfolder (like http://example.com/statamic),
# add that here. E.g. /statamic/
RewriteBase /
# Protect your system files from prying eyes
RewriteRule ^(_app) - [F,L]
RewriteRule ^(_config) - [F,L]
RewriteRule ^(_content) - [F,L]
RewriteRule ^(_logs) - [F,L]
RewriteRule ^(admin/themes/[^/]*/(?:layouts|templates)) - [F,L]
RewriteRule ^(.*)?.yml$ - [F,L]
RewriteRule ^(.*)?.yaml$ - [F,L]
RewriteRule ^(.*/)?.git+ - [F,L]
# This will prevent all .html files from being accessed.
# You may want to remove this line if you want to serve
# static files outside of Statamic
RewriteRule ^(.*)?.html$ - [F,L]
# Remove trailing slashes from your URL
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/(?.*)?$ $1$2 [R=301,L]
# Remove the index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php [QSA,L]