404 and 500 errors in Zend Framework

First of all, I want to review the several mechanisms that Zend Framework provide to handle exceptions in it’s MVC components.   1. Pass the exceptions to Zend_Controller_Plugin_ErrorHandler.   2. Using Zend_Controller_Front::throwExceptions(true) :      3. Using Zend_Controller_Response_Abstract::renderExceptions(true). But it’s not the common way and recommended for non-production environment.   4. Using Zend_Controller_Front::returnResponse(true) :     […]

Posted in Zend Framework | Tagged , | Leave a comment

Sending all css and js in one request

As we all know, one thing which mainly slow down our site is the plenty of css and js files. But very often we have to make them seperate from each other in order to facilitate management.   The problem we met in day-to-day practice is that, it’s more faster to send one file which […]

Posted in Optimization | Tagged , | Leave a comment

htaccess in Zend Framework

How to setting up your .htaccess for your application is always become a question which hard to answer. In this note, we will take a look at it, fully and detail by detail. Hope it to be useful.   The url rewrite configurations below will also be suitable for virtual hosting.   # Php settings […]

Posted in Zend Framework | Tagged , | 1 Comment

301 Redirect for Url SEO

Let’s make the example of this site :   1. www.kimbs.cn 2. kimbs.cn/ 3. www.kimbs.cn/index.html 4. www.kimbs.cn/index.php 5. kimbs.cn/index.php   They are all the same in fact. We now redirect all of them to http://kimbs.cn in order to raise the PR(PageRange).   In .htaccess : # url canonicalization RewriteCond %{HTTP_HOST} ^www.kimbs.cn [NC] RewriteRule ^(.*)$ http://kimbs.cn/$1 [L,R=301]   Easy, isn’t it? […]

Posted in SEO | Tagged | Leave a comment

Setting Up Zend Framework

How to setting up your Zend Framework environment? This is an old question since 1st version released at 1st July, 2007. Here I will show you some of my experience as much as possible.   1.  php set up   Php download : http://www.php.net/downloads.php   Ver.5.29 is recommended as the steady version before php6. Requirements here : http://framework.zend.com/manual/en/requirements.html   Installing […]

Posted in Zend Framework | Tagged | Leave a comment