This is what my .htaccess
looks like. The .htaccess
is sitting in /www/scripts
directory which is the parent of codeigniter's system
directory and which also contains index.php
. I have enabled mod_rewrite
in my Apache 2.2.x. This is on Ubuntu 9.10 server.
I followed this link, but it does not work. Is there anything I need to do in apache2, any specific configuration so that this works?
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [QSA,L]
use this:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /folder/index.php/$1 [L]
Just toss the following code into your .htaccess file
RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]
Source: http://codeigniter.com/user_guide/general/urls.html
Try these links, it may help your question:
http://ellislab.com/forums/viewthread/153950/
http://ellislab.com/forums/viewthread/153372/
here is the solution simply drop in root.
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/$0 [PT,L]
CodeIgniter User Guide on URLs