CodeIgniter works quite successfully on GoDaddy Shared Hosting
You can set it up quite successfully using the CodeIgniter Installation Tips on the CI wiki on GitHub.
These directions are for GoDaddy shared hosting. Shared hosting means that the site is sharing a single web server instance with multiple other GoDaddy customers and that the web server routes people to a specific using the URI domain name since the IP address for the server instance is ambiguous. If you have virtual private hosting (VPS) and a private IP address, these directions are not necessary. But, since the problems that most people have CodeIgniter on GoDaddy hosting relate to issues caused by how shared hosting works, this should be useful.
Another issue people sometimes have is that they are using their GoDaddy shared hosting account as a "sandbox" for testing various technologies. I do that, so there are additional considerations in where to put your CodeIgniter instance and where to put the other technologies you are using in relation to CodeIgniter. I also have WordPress, Drupal, and Joomla instances for testing various aspects of them in my single hosting space. They work just fine along side of CodeIgniter.
If your CodeIgniter instance is in a sub-directory rather than the root directory of your shared hosting account space on the server, that can work, and must be accommodated in the settings.
There are two settings which require adjustment for CodeIgniter to work on GoDaddy. The first is in CodeIgniter's config.php file and the second is in a .htaccess file in the root folder containing the CodeIgniter instance.
CodeIgniter config.php found in the CodeIgniter application/config/config.php
$config['base_url'] = '';
$config['index_page'] = 'index.php?';
$config['uri_protocol'] = 'QUERY_STRING';
.htaccess file in the root folder containing CodeIgniter
First, consider the simple case where CodeIgniter is in the document root of the shared hosting account. The following is the basic .htaccess file contents to go with the above settings.
The lines MUST HAVE UNIX style end-of-line characters (i.e. lf character only). You MUST NOT use an editor (e.g. Windows Notepad) that puts cr/lf at the end of the line or you must have a method of changing them to lf only before or during upload.
When you FTP the file to the server, the FTP client must not mangle the end of line character(s) to be anything other than a lf. If you use and FTP client which can modify end-of-line characters from Windows style (i.e. cr/lf) to UNIX style (i.e. lf) as part of the transfer, you can fix a cr/lf issue in the upload to the server.
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
Your shared hosting account's folders/files should now be similar to:
...
html/application
html/system
html/user_guide
...
html/.htaccess
...
where html is your shared hosting account's document root folder.
The first line in .htaccess ensures Rewrite is on.
Resources within CodeIgniter are referred to using a URI with a URL/controller/method/parameter(s) type structure. The next two lines apply the rewrite rule to only files and directories which do not actually exist.
If you want to reference something which is not a CodeIgniter controller, but a real directory and/or file name for something outside of CodeIgniter, you must turn the rewrite off for them. An example is the CodeIgniter User Guide which comes with CodeIgniter and which lives outside of the CodeIgniter application usually in the same root folder as the CodeIgniter instance and defaulting to a folder named user_guide. If you want to be able to reference the User Guide in its real folder external from CodeIgniter, to work, then the rewrite rule must be disabled for it. This applies to any other "real" folders outside CodeIgniter.
For security reasons, real folders/files within CodeIgniter's folder structure contain their own .htaccess files to prevent direct access to them with a URI. You must ensure that any real folder you create and want CodeIgniter to use is protected that way. A look at any of CodeIgniter's own .htaccess file in its folders will show you how to do that. The contain the following single statement:
Deny from all
To get CodeIgniter to work on GoDaddy shared hosting, we are not really turning off using index.php? from within CodeIgniter. Instead, we are using the HTML query string mechanism for the controller/method/parameter(s) structure for CodeIgniter. The last rule ensures that index.php? gets inserted into the URI so that your controller/method/parameter(s) structure in the URI gets made into a query string for CodeIgniter's index.php to process.
All this should work if the CodeIgniter instance is in the root document directory of the shared hosting account and the domain name which points to it.
Sharing Document Root with Other Technologies
The above settings should work if you put CodeIgniter into your shared hosting document root along with other technologies (e.g., Joomla, WordPress, Drupal, etc.) as long as the other technologies are contained in real folders/files which don't conflict with CodeIgniter folders and files.
Using a Sub-directory for CodeIgniter Instance
Sometimes it is desirable that CodeIgniter NOT be in the root document directory of your shared hosting account, but, instead, in a sub-directory. I do this to keep Drupal, WordPress, and Joomla instances also in their own sub-directories from being co-mingled amongst the CodeIgniter folder structure. For this to work, the .htaccess file requires additional statements. For example, if you want CodeIgniter to live in a directory named code-igniter subordinate to your document root for you shared hosting account, then the following .htaccess file will accommodate using a sub-folder for CodeIgniter's root. It must not be placed within the shared hosting account's document root folder, but, instead, in CodeIgniter's root which, in this case, is a sub-folder named code-igniter:
RewriteEngine on
RewriteBase /code-igniter/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
The directory structure for this example is similar to:
html/code-igniter/application
html/code-igniter/system
html/code-igniter/user_guide
...
html/code-igniter/.htaccess
where html is the document root for the shared hosting account, and code-igniter is the root folder for the CodeIgniter instance.
The additional RewriteBase line ensures that rewrites always work from the directory which is the root directory for the CodeIgniter instance. The subsequent lines still ensure that rewrites don't apply to real folders/files also in my document root for other technologies. I hope this de-mystifies getting CodeIgniter to work on GoDaddy shared hosting in two different scenarios.
The same solution will also work without change if the CodeIgniter instance is located subordinate to multiple sub-directories. For example, suppose the shared hosting account document root is html directory and the CodeIgniter instance is subordinate to code-igniter directory subordinate to my-application directory:
html/my-application/code-igniter/application
html/my-application/code-igniter/system
html/my-application/code-igniter/user_guide
This arrangement is useful if you want to use one instance for development with an IDE which automatically pushes changes to a development instance on file saves and have another instance in a different sub-directory for deployments for integration tests and production. The .htaccess and config.php files will work without modification.