I tried to remove index.php from url. I tried more links from linkden but have not worked. I tried following.
1.add .htaccess file with following data,
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/$0 [PT,L]
2.changed in config.php $config['index_page'] = ''
;
3.activate mod_rewrite
.
But still not working.
Make .htaccess file in root of project directory with following contents:
RewriteEngine on
RewriteCond $1 !^(index\.php|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L,QSA]
modify application/config/config.php with following:
$config['index_page'] = '';
Please replace your htaccess code
RewriteEngine on
RewriteBase /yourfolder/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index\.php|js|img|css|captcha|robots\.txt)
RewriteRule ^(.*)$ /yourfolder/index.php/$1 [L]
Finally the Following code works in .htaccess file
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/$0 [PT,L]