开发者

Problem with .htaccess and index.php

In my development server the, the referrer name will look like dev.host.in and the ip will look like 123.456.456.111/dev/

I am using codeigniter framework. I have already set the .htaccess file to remove the index.php. When I'm accessing site through dev.host.in/testproject/ its working fine. But when I'm accessing it with 123.456.456.111/dev/testproject/ it doesn't display the page. But when I access 123.456.456.111/dev/testproject/index.php 开发者_Python百科I am getting the site.

How to resolve this issue?


Put this in your .htaccess file:

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_URI} ^system.*
    RewriteRule ^(.*)$ /index.php?/$1 [L]
    RewriteCond %{REQUEST_URI} ^application.*
    RewriteRule ^(.*)$ /index.php?/$1 [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>

If you're still having problems, visit this link.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜