Created
October 15, 2015 16:50
-
-
Save afelicioni/42e0a6b5666e8e633c6a 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
# hints: https://ellislab.com/codeigniter/user-guide/general/urls.html | |
<IfModule mod_rewrite.c> | |
RewriteEngine on | |
# installed on subfolder? uncomment the following | |
# RewriteBase /ci/ | |
RewriteBase / | |
# no direct access for /system folder | |
RewriteCond %{REQUEST_URI} ^system.* | |
RewriteRule ^(.*)$ /index.php?/$1 [L] | |
# no direct access for /application folder | |
RewriteCond %{REQUEST_URI} ^application.* | |
RewriteRule ^(.*)$ /index.php?/$1 [L] | |
# no existing file requested? CI front controller will handle it | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule ^(.*)$ index.php?/$1 [L] | |
</IfModule> | |
<IfModule !mod_rewrite.c> | |
# no mod_rewrite support? let front controller handle the game | |
ErrorDocument 404 /index.php | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment