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>
  • 写回答

5条回答 默认 最新

  • dongmeiran609914 2015-01-21 09:03
    关注
    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'] = 'http://127.0.0.1:8000/job/';
    $config['index_page'] = 'index.php';
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(4条)

报告相同问题?

悬赏问题

  • ¥15 delta降尺度计算的一些细节,有偿
  • ¥15 Arduino红外遥控代码有问题
  • ¥15 数值计算离散正交多项式
  • ¥30 数值计算均差系数编程
  • ¥15 redis-full-check比较 两个集群的数据出错
  • ¥15 Matlab编程问题
  • ¥15 训练的多模态特征融合模型准确度很低怎么办
  • ¥15 kylin启动报错log4j类冲突
  • ¥15 超声波模块测距控制点灯,灯的闪烁很不稳定,经过调试发现测的距离偏大
  • ¥15 import arcpy出现importing _arcgisscripting 找不到相关程序