3
My goal is to make an application written in Codeigniter run on the server in a subfolder and not in the main domain, example: www.dominio.com.br/foo
.
The error is about redirecting, every request is being redirected to the home (www.dominio.com.br
).
Contents of the archive www.dominio.com.br/foo/.htaccess
:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L]
Excerpt from the archive www.dominio.com.br/foo/application/config/config.php
:
$config['base_url'] = 'http://www.dominio.com.br/foo/';
...
$config['index_page'] = '/index.php';
I would say that I have already tried to use the Rewritebase thus...
RewriteEngine on
RewriteBase /foo/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L]
...but I didn’t succeed.
I confess that I changed the . htaccess of all that is way and always redirects to the home.
Thank you in advance!
That one
/
at the beginning of hisRewriteRule
(/index php.), is not directing to the root of your server? The.htaccess
original of Codeigniter doesn’t have this bar.– Paulo Rodrigues
Without the
/
tb does not work! Obg.– Flavio Micheletti