Error Pages
19.Nov.2011 | Posted by admin | Filed under Tutorials
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
0 Comments
Write a Comment
Development
Latest Posts
- Dynamic CSS via PHP
- CLEditor Plugin: MyStyles Plugin
- Creating a simple Tooltip in jQuery
- RegExp in SqLite using Php
- jSound - jQuery plugin
- jmotion - jQuery plugin
- Play audio onHover with jQuery
- Black Search plugin
- Japng Image animator
- Themes for Havalite
- mb.mediaEmbedder
- Replace2Anchor
- Plugins and Widgets for Havalite
- iFrame plugin
- Google Fonts Plugin
- Hierarchical Category
- Creating Widgets for Havalite CMS
- Tag Cloud Viewer
- jWise plugin for Havalite
- Print this page 1.0
- Banner us
- Export Manager 1.0
- Developing Themes for Havalite
- Visitor Counter
- Adding Sidebar widgets
- Video Tutorials
- JDaedalum - A Gif like animation
- Plugins and Widgets Development
- Sortable2php
- timeSpam
- TipTip
- UItoTop
- HavaToDo
- Upgrading to Havalite 1.1.1.
- code embedder
- Havalite Interface Translation
- Upgrading to Havalite 1.0.9
- Error Pages
Categories
Support Styleshout
Reached: 155 € goes to charity
















