douzi8112 2015-09-22 06: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-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.

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

报告相同问题?