Welcome Guest, Not a member yet? Register   Sign In
.htaccess index.php rewrite not working on user directory

Hello All, I need some help with this:

I'm using codeigniter 2.x and I have a .htaccess for rewrite the index.php, it works great if I put my projects on /var/www or if I make a virtual host for it.

But I want to use my user directory such as http://localhost/~userdir/myproject. If I use my user directory when I'm trying to do request to a controller like: http://localhost/~userdir/myproject/signup I get this error:

Quote:Not Found
The requested URL /index.php was not found on this server.

This is my current configuration:


RewriteEngine on
RewriteCond $1 !^(index\.php|(.*)\.swf|forums|images|css|downloads|jquery|js|robots\.txt|favicon\.ico)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?/$1 [L,QSA]


PHP Code:
$config['base_url'] = '';
$config['index_page'] = '';
$config['uri_protocol'] = 'AUTO';
$config['encryption_key'] = 'myencryption_key';
//all remaining is the default config 

This config works great on http://localhost/ and also on production enviroments with a domain like http://example.com/ but not on my user directory http://localhost/~userdir/project/ neither on production like http://example.com/~userdir/project

Any thoughts? Thanks in advance.

Messages In This Thread
.htaccess index.php rewrite not working on user directory - by carloscarcamo - 02-05-2015, 11:25 AM

Theme © iAndrew 2016 - Forum software by © MyBB