Created
August 23, 2012 16:51
-
-
Save pauloelias/3438636 to your computer and use it in GitHub Desktop.
Simple ExpressionEngine .htaccess
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Standard ExpressionEngine Apache Configuration (.htaccess) | |
# httpd.apache.org/docs/2.2/mod/quickreference.html | |
# ------------------------------ | |
# SECURITY: Secure "dot" files/directories | |
# ------------------------------ | |
# Block access to "hidden" directories or files whose names begin with a | |
# period. This includes directories used by version control systems such as | |
# Subversion or Git. | |
# <IfModule mod_rewrite.c> | |
# RewriteCond %{SCRIPT_FILENAME} -d [OR] | |
# RewriteCond %{SCRIPT_FILENAME} -f | |
# RewriteRule "(^|/)\." - [F] | |
# </IfModule> | |
# Rewrite Magic | |
# ------------------------------ | |
<IfModule mod_rewrite.c> | |
# RewriteEngine On | |
RewriteBase / | |
# INDEX: Standard ExpressionEngine Rewrite | |
# ------------------------------ | |
RewriteCond $1 !\.(css|js|gif|jpe?g|png) [NC] | |
RewriteCond %{REQUEST_FILENAME} !-f [NC] | |
RewriteCond %{REQUEST_FILENAME} !-d [NC] | |
RewriteRule ^(.*)$ /index.php/$1 [NC,R=301,L] | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment