douzi8112 2015-09-22 06:11
浏览 129
已采纳

重新安装的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-22 06: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.

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

报告相同问题?

悬赏问题

  • ¥100 Jenkins自动化部署—悬赏100元
  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条
  • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘
  • ¥15 perl MISA分析p3_in脚本出错
  • ¥15 k8s部署jupyterlab,jupyterlab保存不了文件
  • ¥15 ubuntu虚拟机打包apk错误
  • ¥199 rust编程架构设计的方案 有偿
  • ¥15 回答4f系统的像差计算
  • ¥15 java如何提取出pdf里的文字?