Skip to content

Instantly share code, notes, and snippets.

@adamthebig
Last active August 29, 2015 14:13
Show Gist options
  • Save adamthebig/d26c2155ce7616d01fbb to your computer and use it in GitHub Desktop.
Save adamthebig/d26c2155ce7616d01fbb to your computer and use it in GitHub Desktop.
Default .htaccess file for all ExpressionEngine sites
RewriteEngine On
RewriteBase /
RewriteCond $1 !\.(gif|jpe?g|png|pdf)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?/$1 [L]
# Prevent file access
RedirectMatch 403 ^/test
RedirectMatch 403 ^/templates
RedirectMatch 403 ^/source
<FilesMatch "^\.">
Order allow,deny
Deny from all
</FilesMatch>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment