Feb 20

I had a bit of a hard time getting Zend Framework to run on my 1&1 hosting. It was all down to the .htaccess file in the end. The default htaccess configuration in the ZF getting started guide just doesn’t work, and neither did all the other posts I could fine on the subject around the internet, however, I’ve finally cracked it.

Presuming you’ve put your ZF index file in the webroot, here’s what the 1and1 htaccess file should look like.


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

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule !\.(txt|swf|js|ico|gif|jpg|png|css|xml)$ /

Note: The same file will not work on my local dev machine, which is running only PHP5. You will need to comment out the first two lines (AddHandler, AddType) to get it to run on a stadard PHP5 installation.


4 comments so far...

  • warthpublishinginc Said on February 23rd, 2009 at 1:06 am:

    I advise people to check out web hosts and domain registers very carefully before committing.
    I have come to the conclusion that I made the dreadful error of choosing a company because it had a 5 page ad in a popular computer magazine. I believe I have put my trust in a straw man. In my opinion 1and1, with CEO Oliver Mauss, is a horrible company and many customers have voiced a host of complaints on various blogs.
    It should be a warning that when their phone is answered by a recording that tells you if you have gotten a notice from NCO, a collection agency, to press a certain number. If they are a reputable business, why do they have to send so many accounts to a collection agency?
    Patrick Frey (Patterico) of the Los Angeles District Attorneys Office alleges his domain was high jacked and put up for auction on SEDO. SEDO is an associate company of 1and1.
    Patterico: “I believe I’m facing massive incompetence, thievery, or very possibly a deliberate combination of the two. It feels like evil intent — but not for political reasons. It feels like cyber extortion — people going after the almighty dollar. Commenter’s have pointed out corporate ties between 1&1, which can’t seem to process my timely renewal, and Sedo/Domcollect, which stood to profit from 1&1’s failure. Usually, corporate incompetence does not earn the corporation money — but 1&1 and its related companies have found a way to make money off of their own slipshod procedures.”
    Patterico was able to regain his domain.
    Also Investigative journalist, Kelli Jack, has written 30 articles about this company and has a suit pending against them. Kelli alleges that 1and1 stole her domain name and sold it. Kelli states: “1and1 should be shut down.” As of today Kelli is working with the Pennsylvania Attorney General.
    I have filed complaints with the Federal Bureau of Investigation, Federal Trade Commission, Eastern Pennsylvania Better Business Bureau, ICANN, and others. I recommend everyone else having a problem consider doing the same.

    The Washington DC, Pennsylvania Better Business Bureau has them listed as “Unsatisfactory” Read comments on the BBB why. Read some customer comments on Red Flag.
    Don’t bother trying to access my 2 URL: warthpublishinginc.com, Migraine-Abort.com
    They are gone with my money and numerous domains I had at 1and1.

    Warth Publishing Inc

  • admin Said on February 23rd, 2009 at 1:23 pm:

    I wasn’t sure whether I should allow that above comment since this site is hosted with 1and1.However, my belief in free speech means I can’t really go censoring it can I. Not only that, but I can’t really argue with the points raised. Saying they should be shut down is a step too far in my opinion.

    They are far too hasty with recovery agencies, rather than actually making any effort to talk to their customers first (had first hand experience of this) and their customer support is absolutely atrocious, but all in all, if you know what you’re doing (and often with a bit of trial and error) you can get most things done without having to contact them.

    I probably would choose them again, but I’m here now, so may as well stay unless they really piss me off.

  • Steve Said on March 14th, 2009 at 2:26 pm:

    A good tip! though it implies that 1&1 are still using php4 as default?? And version 6 is in the pipeline!

  • chris Said on August 7th, 2009 at 6:53 pm:

    I tried with 1and1, bought a 12 month server, was promised they’d help setup ZF, and what happend - sorry we dont support programming! I didnt bother telling them I’m a OOAD C++/PHP coder, what’s the point! Although I do use them for domains :)

    Anyway, I’m so chuffed that you got this working; our solution was to use the Dataflame - We have been with 10 hosting providers in the last 8 years - none have come close to Dataflame. [we have 2 managed dedicated servers now :]

    Need zend optimiser installed and setup? Live chat to Dataflame, 2 mins later its ready and working. Need Zend Framework? Live chat to Dataflame (darren) and hey presto is all setup so you can putty in, auto-setup the quick start application, etc.

    For programmers that use CPanel or WHM, but dont understand UNIX, SSH, .. , ETC - then having a hosting provider that provide ‘helpful’ support - relative to what you are trying to achieve.

leave a reply