hi to all, I am doing custom 404 error pages in asp.net. I have created 404.html page. We have asp.net hosting and have plesk control panel. I have to implement custom 404 page in that. How can i do that. Give me relevent suggestion
Login to Plesk and click on the domain name you want to have a custom error page for. Now click on the "Setup" icon. Under "Services" enable the "Custom Error Documents" tick box. Then go to the error_docs/ folder on your server and edit the not_found.html document.
If you are using .Net then you put it in the web.config file See the MS page on it or do a google http://www.asp.net/hosting/tutorials/displaying-a-custom-error-page-cs
i am assuming that you are using II7 windows server then please Add following code in your web.config file, it will get redirect to your custom error page
Try This one <customErrors mode="On" defaultRedirect="~/DefaultErrorPage.htm" > <error statusCode="404" redirect="~/FileNotFound.htm"/> <error statusCode="403" redirect="~/Forbidden.htm"/> </customErrors> Code (markup):
Create an HTACCESS file and dump this code in there. php_value register_globals 1 RewriteEngine on ErrorDocument 404 http://www.yourwebsite.com/404.html Code (markup):