简体   繁体   中英

Reinstalled WAMP now can't open my project redirects to 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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM