My goal is to make an application written in Codeigniter run on the server in a subfolder and not in the main domain, eg: www.dominio.com.br/foo
.
The error is about redirection , every request is being redirected to home ( www.dominio.com.br
).
Content of file www.dominio.com.br/foo/.htaccess
:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L]
Excerpt from file www.dominio.com.br/foo/application/config/config.php
:
$config['base_url'] = 'http://www.dominio.com.br/foo/';
...
$config['index_page'] = '/index.php';
I've already tried using RewriteBase in this way ...
RewriteEngine on
RewriteBase /foo/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L]
... but tb I was not successful.
I confess tb that I changed the .htaccess of everything that is form and always redirects to the home.
Thank you in advance!