douzi8112 2015-09-21 22:11
浏览 131
已采纳

重新安装的WAMP现在无法打开我的项目重定向到index.php

I just reinstalled wamp and tried to open my CI project. I open the default page of my project but when i click on any link it redirects to project list page of wamp. Supppose default page is login then it opens but when i click on login it redirects me to default index page of wamp i searched the stack and found that changing this from true to false might help.

$suppress_localhost = false;

But this doesn't work for me. I think the possible reason might be my .htaccess file in Codeigniter project. This is its code:

<IfModule mod_rewrite.c>
    RewriteEngine On
    # !IMPORTANT! Set your RewriteBase here and don't forget trailing and leading
    #  slashes.
    # If your page resides at
    #  http://www.example.com/mypage/test1
    # then use
    # RewriteBase /mypage/test1/
    RewriteBase /crm/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?/$1 [L]
  </IfModule>

  <IfModule !mod_rewrite.c>
    # If we don't have mod_rewrite installed, all 404's
    # can be sent to index.php, and everything works as normal.
    # Submitted by: ElliotHaughin

    ErrorDocument 404 /index.php
  </IfModule>

Please Help me solve this issue.

  • 写回答

1条回答 默认 最新

  • dourao1968 2015-09-21 22:47
    关注

    By default WAMP's Apache rewrite module is turned off. Try turn it on, and restart the service. You can turn the module on in the tray menu (Apache -> Apache modules), or in the httpd.conf file uncomment this line: "LoadModule rewrite_module modules/mod_rewrite.so". Hope it helps.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
编辑
预览

报告相同问题?

悬赏问题

  • ¥15 PADS Logic 原理图
  • ¥15 PADS Logic 图标
  • ¥15 电脑和power bi环境都是英文如何将日期层次结构转换成英文
  • ¥20 气象站点数据求取中~
  • ¥15 如何获取APP内弹出的网址链接
  • ¥15 wifi 图标不见了 不知道怎么办 上不了网 变成小地球了
手机看
程序员都在用的中文IT技术交流社区

程序员都在用的中文IT技术交流社区

专业的中文 IT 技术社区,与千万技术人共成长

专业的中文 IT 技术社区,与千万技术人共成长

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

客服 返回
顶部