rostamiani rostamiani - 9 months ago 24
PHP Question

Removing index.php from CodeIgniter url redirects to localhost

I'm developing with WampServer and tried to remove index.php from CodeIgniter urls. Added these lines to .htaccess file as I saw in ellislab website:

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

This is the root of my website:

But now when I want to navigate urls like http://localhost/job/seeker I see the Wampserver config page that is on http://localhost/.

What can I do?


Answer Source
RewriteEngine on
RewriteBase /job
RewriteCond $1 !^(index\.php|images|table-images|robots\.txt|styles|js|uploads)
RewriteRule ^(.*)$ index.php/$1 [L]

and set in application/config/config.php

$config['base_url'] = '';
$config['index_page'] = 'index.php';