Latest |Kites |Pictures |Programming |Life
[filed under Programming]1 and 1 1&1 1and1 adventures

1&1 shared hosting, .htaccess Zend Framework.

Here is my .htaccess file to get ZF up and running:

AddType x-mapp-php5 .php
AddHandler x-mapp-php5 .php

#php_value magic_quotes_gpc off
#php_flag magic_quotes_gpc off

#SetEnv APPLICATION_ENV development

#
# check SUB-DOMAIN
#
SetEnvIf Host ^demo\. APPLICATION_ENV=demo

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^demo\.
RewriteRule robots.txt demo.robots.txt [NC,L]
#
RewriteRule robots.txt list.robots.txt [NC,L]
# if the file exists - serve it
RewriteCond %{REQUEST_FILENAME} -s
RewriteRule ^.*$ - [NC,L]

RewriteRule !\.(js|ico|gif|jpg|png|css)$ index.php
Options -MultiViews

Note that php_value and php_flag DO NOT WORK they give 500 server errors (no idea why) but you can set these flags via a php.ini file saved in the same directory as the .htaccess.

I have a subdomain (demo) that points at the same ZF project, but it passes in the demo flag to tell it not to worry about some things. It also passes a different robots.txt out for the demo site.

php_value php_flag 500 server error htaccess.

25th of January, 2011@11:44:19 PM
add a comment, permanent link to article

Comments

Comment

Sorry, but until I can figure out how to stop the spam, comments are disabled :(

Server Grind [0.0149 seconds]