Error Pages

HavaLite CMS

A new liteweight Content Management System (CMS)

Error Pages

Havalite version 1.0.8

Up to this version Havalite can handle error pages which are assigned from server as 403 (forbidden) or 404 (Not found). There are surely much more HTTP error codes than these two (see here) but we left this part up to you which code need to be handled.

To customize your HTTP error codes, create a file, copy following code and save as .htacccess to the root directory:

ErrorDocument 404 /havalite/hava_error.php

To add more codes, copy and past the line and change the number to your requested error code. Example:

ErrorDocument 401 /havalite/hava_error.php

If you didn't install havalite in the root directory, you need to define the right path to hava_error.php in your .htaccess file by adding the directory name in which havalite is installed. Example

ErrorDocument 404 /(directory name)/havalite/hava_error.php

Design your Error page

The default error page text is "PAGE NOT FOUND!". To change this error text go to admin area of Havalite, Click on the menu "Settings" and choose "Design". In the textarea you can add your own text or HTML.

You can also handle any error from within your theme by redirecting to havalite/hava_error.php or ?p=error or by calling  the hava_option('error_page'); function. Here's an example for requesting a post which is not integer:

if ( !is_numeric($p) ) {
   echo hava_options('error_page');


Hint: some servers do not allow users to upload there own .htaccess files with the ErrorDocument command per ftp. But instead you can do that directly in your service center by looking for the error_files section. In the form input for 404 errors add the line /havalite/hava_error.php

comments powered by Disqus


    Leave a Reply

    Contact Info

    Phone: +49 941 26175

    Address: Ayman Teryaki,
    Prüfeninger Str. 48,
    93047 Regensburg, Germany

    Want more info - go to our contact page or visit Google+


    Stay up to date. Subscribe via RSS, Facebook, Twitter or Email

    Recent Comments