Namal
Namal

Reputation: 2071

codeigniter url redirect is not woking fine

I newly uploaded my codeigniter project to the server. It's uploaded to a folder(app). Now it's redirection is not working. Always it redirects to home page.

folder path : http://domain.com/app

htaccess rule is RewriteRule ^(.*)$ index.php/$1 [L]

How should I alter the rule according to the folder path.

Upvotes: 0

Views: 233

Answers (1)

Jeremie Ges
Jeremie Ges

Reputation: 2745

I know this problem, do you use dreamhost or gandi hosting ?

Try it :

In your .htaccess

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^(.*)$ index.php?/$1 [L,QSA]

In your application/config/config.php

$config['uri_protocol'] = 'AUTO';

Enjoy :)

Upvotes: 1

Related Questions