Codeigniter .htaccess for godaddy and other servers Codeigniter Installation / Configuration:

Having just struggled with this issue myself, this seems to be the shortest path to proper performance on Godaddy. This is entirely based on other people’s posts but, I didn’t really see this all in one place so I thought I do just that.

Without Htaccess: (Change in the config.php)

$config['index_page'] = "index.php?";
$config['uri_protocol'] = "QUERY_STRING";

So, Now You should now be able to access everything as such:(without htaccess)

Codeigniter with htaccess:

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?$1 [L]

You should now be able to access everything as such:

For other servers:(With htaccess)

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1

You can see the difference now that i have colored with red.

Hope this will help some one.

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.