Welcome Guest, Not a member yet? Register   Sign In
Error establishing a database connection with htaccess
#1

[eluser]earlyriser[/eluser]
I had some trouble configuring the htaccess file for non-index.php urls in a subfolder. Here is the solution.

PROBLEM:
CI fresh installation in a subfolder. Everything is fine but when the htaccess file is uploaded as specified in http://ellislab.com/codeigniter/user-gui.../urls.html an "Error establishing a database connection" message is prompted.

SOLUTION:
Try this code found in http://opinionatedcoder.wordpress.com/20...-htaccess/

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


That's all.


Messages In This Thread
Error establishing a database connection with htaccess - by El Forum - 05-22-2009, 02:09 PM
Error establishing a database connection with htaccess - by El Forum - 05-22-2009, 02:18 PM



Theme © iAndrew 2016 - Forum software by © MyBB