简体   繁体   中英

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 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 .

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