douding_1073 2016-08-16 10:11
浏览 47
已采纳

Codeigniter子域404未找到

I'm new to codeigniter and I'm working on a project that is done on this framework. When I try to access a url such as "mysite.com/about", it gives me and an error 404 Not found, I tried many .htaccess file on wamp and a live host but the result is the same. I can Access these file by using "mysite.com/index.php/about" but I want to access as this "mysite.com/about" this not only for about page but all so very page that I try to access by using like this "mysite.com/contact-us" .How do I fix this?

  • 写回答

3条回答 默认 最新

  • doumen1883 2016-08-16 10:48
    关注

    Write this code in your .htaccess file and in wamp server click on rewrite_module

    <IfModule mod_rewrite.c>
    
       RewriteEngine On
       RewriteCond %{REQUEST_FILENAME} !-f
       RewriteCond %{REQUEST_FILENAME} !-d
       RewriteRule ^(.*)$ index.php/$1 [L]
       IndexIgnore *
    
    </IfModule>
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?