.htaccess problem at BrainHost or DreamHost

Sometimes, it makes you crazy when you see that your Codeigniter (CI)  application is not working in live server. This type CI problem is very usual in DramHost or BrainHost server due to .htaccess configuration. You will have to do a little changes to make the .htaccess work.
In your config.php file, please set

$config['index_page'] = "";  


$config['uri_protocol']    = "AUTO"; 

Finally, add this .htaccess file to your server root or in the folder where your files are located…

<IfModule mod_rewrite.c>
    Options +MultiViews +FollowSymLinks
    DirectoryIndex index.php index.html
    RewriteEngine on

    RewriteRule modules/(.+)/controllers/(.+)\.php$ /index.php?/$1/$2 [L,R=301]
    RewriteRule controllers/(.+)\.php$ /index.php?/$1 [L,R=301]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?/$1 [L]

Yeah!! it’s done. And your CI app is working properly.


Eftakhairul Islam

Hi, I'm Eftakhairul Islam, a passionate Software Engineer, Hacker and Open Source Enthusiast. I enjoy writing about technical things, work in a couple of startup as a technical advisor and in my spare time, I contribute a lot of open source projects.


2 thoughts on “.htaccess problem at BrainHost or DreamHost

  1. Vaia, Do you know any free host server which will allow me to change its default .htaccess? I was using zymic host for an online file uploader but I guess when the uploading time increases and exceeds a certain time, it prompts “No file uploaded\file type does not match!” and so on. I think i need to change .htaccess and reset the time limit. But free servers are not allowing me to do so, is there any other way to do that? Or any other free server will you suggest?

Leave a Reply

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.

Read previous post:
Knowledge Sharing Session – Ruby at ManGoes Mobile, Inc.

On last 5 April, I took a technical session titled: Knowledge Sharing Session - Ruby at Mangoes Mobile, Inc. This is...