If you need to install and run CodeIgniter on a 1and1 dedicated server or shared environment and come across problems running PHP files, chances are you’ll need to tell the server to run the .php extension as PHP5, particularly if you’re using external libraries. If you’re not sure how to do this see below for an example htaccess file specific to CodeIgniter.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L] AddType x-mapp-php5 .php AddHandler x-mapp-php5 .php </IfModule> <IfModule !mod_rewrite.c> ErrorDocument 404 index.php </IfModule> |
If you’re anything like me and do web development for different sized companies, from small businesses to bigger brands, you sometimes have to live with the hosting choice of the client. If you can avoid it though, I would strongly suggest not using 1and1 - their offering is outdated and support has been widely criticised. There are much better options out there for not much more money such as Bytemark’s virtual machines or The Rackspace Cloud.

Your fix also made my website run. Thank you very much for saving me time.
hi, I have problem running CodeIgniter with 1 & 1, I have tried every solution ….but getting the same “404 Page Not Found , The page you requested was not found” page
my default folder is qapp for codeigniter
http://www.qhangers.com/qapp
The last setting .htaccess as follow (but still getting same result)
—————————————————————————————-
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
AddType x-mapp-php5 .php
AddHandler x-mapp-php5 .php
ErrorDocument 404 index.php
——————————————————————————————-
In addition, I also changed the config.php parameter
$config['uri_protocol'] = “REQUEST_URI”;
Please help!!
Worked like a charm! Thank you