My CodeIgniter .Htaccess

Htaccess
This is my .htaccess file

RewriteEngine on
RewriteCond $1 !^(index\.php|images|user_guide|assets|captcha|robots\.txt)
RewriteRule ^(.*)$ index.php/$1 [L]

It should be placed in root of the website. Rewrite module of apache should be enabled or it will give you an 500 internal server error.

With this you can skip index.php in URL. Also some folders like images, assets you don’t want redirection. This file does all this. Short and sweet.

Tested on wamp 2.0i with codeigniter 1.7.2

Let me know your CSS.

Popularity: 77% [?]

Sep20

One Response to “My CodeIgniter .Htaccess”

  1. Thank you for sharing with us.

Leave a Reply