Max Cataraga’s Blog

Only the small secrets need to be protected. The big ones are kept secret by public incredulity (Marshall McLuhan)

Archive for the 'Uncategorized' Category

Zend Framework Rewrite with 1&1 Web Hosting

If you plan to host your Zend-based web-application on a 1&1 ( 1and1 / 1und1 ) server, you should consider the two following special features in the .htaccess-file:

  • The first one is to define the RewriteBase for your project which is simply the root directory /. Otherwise you will get an HTTP error 500 (or something like that).
  • And the second one is to disable the Multiviews option. Otherwise you will get the HTTP error 404 (or something like that).

1
2
3
4
5
6
7
AddType x-mapp-php5 .php
AddHandler x-mapp-php5 .php 

RewriteEngine on
RewriteBase /
RewriteRule !.(js|ico|gif|jpg|png|css)$ index.php
Options -MultiViews

PHP5 is not enabled by default. So that’s why I inserted the AddType and the AddHandler statements at the beginning. ;)

No comments