Ali Zia
Ali Zia

Reputation: 3875

Codeigniter website not working on localhost

I downloaded a website from my live server. I want to run it on my localhost. I changed the base_url to my localhost url but this is not working. This is my config.php.

Live Site:

$config['base_url'] = 'http://my_site/portal/';

LocalHost:

$config['base_url'] = 'http://localhost/limo/portal/';

This is my .HTACCESS

<IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteBase /portal/

        # Removes index.php from ExpressionEngine URLs
        RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC]
        RewriteCond %{REQUEST_URI} !/system/.* [NC]
        RewriteRule (.*?)index\.php/*(.*) /$1$2 [R=301,NE,L]

        # Directs all EE web requests through the site index file
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule ^(.*)$ /portal/index.php?/$1 [L]
</IfModule>

Please help me as this is my very first project in codeigniter.

Upvotes: 0

Views: 1936

Answers (1)

giorgio
giorgio

Reputation: 10212

Change your RewriteBase to /limo/portal/ and remove /portal/ from the last RewriteRule.

Upvotes: 2

Related Questions