Thursday, May 26, 2011

The dynamic stylesheet language


Recently i was searching for compacting heavy css for my website in less css with dynamic css code, i came across, it's a fabulous website which provides dynamic integration of css.

"LESS extends CSS with dynamic behavior such as variables, mixins, operations and functions. LESS runs on both the client-side (IE 6+, Webkit, Firefox) and server-side, with Node.js."


Ujjwal Soni

Wednesday, May 11, 2011

Redirect all 404's to index page in php

This given PHP example redirect to index page if there is 404 error in your site.

Create the file app/app_error.php with the following code.

Code Example:

class AppError extends ErrorHandler {
    function error404($params) {
        // redirect to homepage