Do U know what happens when a user enters D url of a page that is not present on your server???
Well in normal cases & in most cases, D user will see a 404 Error (File Not Found) Page generated by D browser. Now that is really annoying as D user has 2 go back & find another page. So what is D solution.
Simple just follow the steps & U'll get results that'll make your site look more professional.
- Create a page with D theme of your site. U can add anything like ads, menus, just think what U want 2 do with a page.
- Next save it with a suitable name like 404.html.
- Create a text file and save it as htaccess.txt.
- In htaccess.txt type, ErrorDocument 404 /404.html
- Save all the files & upload them on your server in your main directory.
- IMPORTANT : Rename D htaccess.txt to .htaccess (do not add any extension)
- Done now if the user types any url that is not found, then D user will B directed 2 this custom page.
Now U can also make custom pages 4 any error, just add another line ErrorDocument 404 /404.html & replace D 404 with D error U want 2 make D page 4 & 404.html with D page name.
Here are a short list of error numbers:
- 400 - Bad Request
- 401 - Not Authorised
- 403 - Forbidden
- 404 - Not Found
- 408 - Request Timeout
- 410 - Gone
- 415 - Unsupported Media Type
- 500 - Internal Server Error
- 503 - Service Unavailable