Created
March 1, 2016 14:15
-
-
Save onubadev/f4866d99109cccb8d020 to your computer and use it in GitHub Desktop.
CI: remove index.php from URLs
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
| # Aditionally set the $config['index_page'] var in config file to blank | |
| # so you avoid the index.php in URL helper functions like site_url() or base_url() | |
| DirectoryIndex index.php | |
| RewriteEngine on | |
| RewriteBase / | |
| RewriteCond %{REQUEST_FILENAME} !-f | |
| RewriteCond %{REQUEST_FILENAME} !-d | |
| RewriteCond $1 !^(index\.php|robots\.txt) | |
| RewriteRule ^(.*)$ index.php?/$1 [L] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment