Last active
December 21, 2015 16:59
-
-
Save nicksheffield/6337669 to your computer and use it in GitHub Desktop.
Basic codeigniter .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
<Files .htaccess> | |
order allow,deny | |
deny from all | |
</Files> | |
RewriteEngine on | |
# Don't use rewrite if its a real file or folder | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
# In addition to the above rules, also ignore the index.php | |
# file, anything in the assets folder and the robots.txt file | |
RewriteCond $1 !^(index\.php|assets|robots\.txt) | |
# Route everything else through the index.php file. | |
RewriteRule ^(.*)$ index.php?/$1 [L] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment