Nisha haridas
Nisha haridas

Reputation: 332

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?

Upvotes: 0

Views: 201

Answers (1)

hohner
hohner

Reputation: 11588

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.

Upvotes: 1

Related Questions