jQuery is a nice script if you want to give some nice effect and functions to your website. With simply steps you can change the way how your visitors interact with the page. jQuery is very popular and is imported in all websites almost. If you already have it, scroll down to the examples, and if not visit jquery.com where you can download the production script just 32kb.
In the Apache web server, .htaccess (hypertext access) is the default name of directory-level configuration files. A .htaccess file is placed in a particular directory, and the directives in the .htaccess file apply to that directory, and all subdirectories thereof. It provides the ability to customize configuration for requests to the particular directory. The file name starts with a dot because dot-files are by convention hidden files on Unix-like operating systems.
1. Custom 404 Error Page
image by smashingmagazine.com
The first trick is about "404 File Not Found" server error page. We can put whenever we want that our visitors see when they tries to access a page on our site that doesn’t exist.
Is very cool that we can replace the server’s default error page with one of our own that explains the error in plain language and links visitors to your home page. Here’s how to use your own page:
Create a .html file with name 404_error.html and add your html code for your custom 404 error page.
Open .htaccess file and add the following code:
ErrorDocument 404 /404_error.html
404_error.html page to your root dir and save the .htaccess file. For the last step we need to test this page. Visit your site yoursite.com/blablabla.html something similar and our 404 error page is coming up.