Jae Kun Choi
Jae Kun Choi

Reputation: 2029

Codeigniter without index.php changing in config and .htaccess not working

I have this issue with codeigniter for my subdomain where I would like to take out index.php but is not working for some reason.

I have set .htaccess with below:

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

and also config.php index_page settings have been changed like below:

$config['index_page'] = '';

do you know why it's not working?

Upvotes: 0

Views: 2139

Answers (2)

Brad
Brad

Reputation: 1691

And this is mine

DirectoryIndex index.php
RewriteEngine on

RewriteCond $1 !^(index\.php|(.*)\.swf|forums|images|css|downloads|js|robots\.txt|favicon\.ico)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ ./index.php?$1 [L,QSA] 

Upvotes: 1

Oskenso Kashi
Oskenso Kashi

Reputation: 1104

This is how mine is currently setup, hope this helps.

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]

Upvotes: 0

Related Questions