Created
July 11, 2012 21:29
-
-
Save k0d3r/3093703 to your computer and use it in GitHub Desktop.
CodeIgniter .htaccess
This file contains 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
# Display PHP errors | |
php_flag display_errors On | |
# Enable the rewrite engine | |
RewriteEngine On | |
# Inherit the rules from the core .htaccess | |
RewriteOptions Inherit | |
#------------------------------------ | |
# CodeIgniter Rewrite Rules | |
#------------------------------------ | |
RewriteBase / | |
# Prevent access to the system and application directories | |
RewriteCond %{REQUEST_URI} ^system.* | |
RewriteCond %{REQUEST_URI} ^application.* | |
RewriteRule ^(.*)$ /index.php/$1 [L] | |
# If the user is not attempting an existing file or directory send the request to index.php | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule ^(.*)$ index.php/$1 [L] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment