Below is an example of a .htaccess file, just copy and paste into your file, but change the paths:
ErrorDocument 404 /path_to_your_error_file_or_script
ErrorDocument 403 /path_to_your_error_file_or_script
ErrorDocument 403 /path_to_your_error_file_or_script
ErrorDocument 500 /path_to_your_error_file_or_script
Examples:
Full path would be http://www.yourwebsite.com/path_to_your_error_file_or_script
Absolute path would be /home/yoursite.com/path_to_your_error_file_or_script
Relative path would be /path_to_your_error_file_or_script
To summarise the steps, they are as follows:
- Create a text file, and add to it a line for each error and rename it .htaccess
- Upload the files/script that the .htaccess file calls in each error.
- TEST! By typing a weird URL in the address box - you should get the 404 custom error.
Cheers!
No comments:
Post a Comment