Ad

How To Remove "index.php" In Codeigniter's Path

- 1 answer

How do I remove the "index.php" sticking out in every path in codeigniter somewhere in the center? I want clean non index.php-fied URLs?

Ad

Answer

If you are using Apache place a .htaccess file in your root web directory containing the following:

RewriteEngine on
RewriteCond $1 !^(index\.php|[Javascript / CSS / Image root Folder name(s)]|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

Another good version is located here:

http://snipplr.com/view/5966/codeigniter-htaccess/

Ad
source: stackoverflow.com
Ad