douzhi6160
2015-01-21 08:34
浏览 97
已采纳

从CodeIgniter url中删除index.php会重定向到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: https://www.codeigniter.com/user_guide/general/urls.html

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

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

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?

Thanks

</div>

图片转代码服务由CSDN问答提供 功能建议

我正在使用WampServer开发并尝试从CodeIgniter网址中删除index.php。 我在ellislab网站上看到这些行添加到.htaccess文件中: 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 /

但现在当我想要导航网址时,如 http:// localhost / job / seeker 我看到 http:// localhost /

我该怎么办?

谢谢

  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 邀请回答

5条回答 默认 最新

相关推荐 更多相似问题