从CodeIgniter网址中删除index.php重定向到本地主机

问题描述:

我正在使用WampServer进行开发,并尝试从CodeIgniter网址中删除index.php。如我在ellislab网站中所见,将这些行添加到了.htaccess文件中:
https: //www.codeigniter.com/user_guide/general/urls.html

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: https://www.codeigniter.com/user_guide/general/urls.html

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

这是我网站的根目录:
http:// localhost / job /

This is the root of my website: http://localhost/job/

但是现在当我想浏览 http:// localhost / job / seeker 我看到 http:// localhost /

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

我该怎么办?

谢谢

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

并在application / config / config中设置.php

and set in application/config/config.php

$config['base_url'] = 'http://127.0.0.1:8000/job/';
$config['index_page'] = 'index.php';