Codeigniter .htaccess for Godaddy.com
Recently we ran into a problem about .htaccess on godaddy.com, since we just moved the website there we weren’t aware that godaddy has an issue on .htaccess. We took time tinkering with the codes, and so glad to have found it in the codeigniter community. htaccess for PHP-CGI hosting (and use segments with query strings). I’m making a repost of the setting, here goes:
/system/application/config/config.php
look for this statement: $config['uri_protocol'] = “AUTO”;
comment it and paste the following codes:
$config['uri_protocol'] = "APP_PATH"; //enable query strings if required. $config['enable_query_strings'] = TRUE;
and for the .htaccess file on the root directory these are the codes:
RewriteEngine On
RewriteBase /
RewriteCond %{ENV:REDIRECT_APP_PATH} !^$
RewriteRule ^(.*)$ - [E=APP_PATH:%{ENV:REDIRECT_APP_PATH}]
RewriteCond %{ENV:APP_PATH} ^$
RewriteRule ^(.*)$ - [E=APP_PATH:/$1]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php [L]
and there you go. works like a charm for me. ^_^






THANKS alot…
This fix was very important for us, And I was Drilling down for the solution from last 3 days ..
Glad to help you ^_^
still works
This works great for InMotion Hosting too. However, I noticed my application takes longer to load now. Did you notice your site loading slower now or is it just me?
didn’t really notice that, since we are in a 3rd world country things load a bit slow here… ^_^ could be the server could be the code; try to play around with the code you might come up with something faster ^_^
Even though it’s been months since you posted this walkthrough, I just wanted to say that it’s still helping us solve our shared hosting problems. Thanks so much!
You are the master!!, thanks!!!