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.
