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

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

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.

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

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.

Wow, I completely forgot about my old blog (It kind of died when it came around to exams, and then a job) glad people still find it useful Smile

Just checked the WP CP, and somehow, that blogs now getting more traffic then when I was posting on it (Might start it up again)

Theme © iAndrew 2016 - Forum software by © MyBB