oceans Posted October 8, 2007 Share Posted October 8, 2007 Dear people, I am using cpanel, I recently noted that there is a function in the list of controls, if we have a 403 error, we can write a script to do something, but it is empty to start with, thus I do not what is it to write (java, html, php,…) Can any one suggest what would it be, I just want to point to my home page if any 403 happens. Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/72247-help-on-cpanel-403/ Share on other sites More sharing options...
~n[EO]n~ Posted October 8, 2007 Share Posted October 8, 2007 There are a few general rules in creating Custom Error pages via the forms in the Cpanel. 1) you cannot have forms in your Custom Error Pages. Forms only rewrite the buttons used to make the Cpanel Form. 2) If you want an easy way or writing the custom error pages, just write them in Notepad and save them as the following: 400.shtml, 401.shtml, 403.shtml, 404.shtml, and 500.shtml Their .htaccess is set up by default to go to 4xx.shtml error pages in that directory. You only have to change the .htaccess file if you want different behavior. Quote Link to comment https://forums.phpfreaks.com/topic/72247-help-on-cpanel-403/#findComment-364371 Share on other sites More sharing options...
oceans Posted October 9, 2007 Author Share Posted October 9, 2007 Thanks, Is "shtml" the same as "html"? I want to write a script to point to a certain page if this error occues,thanks. Quote Link to comment https://forums.phpfreaks.com/topic/72247-help-on-cpanel-403/#findComment-365195 Share on other sites More sharing options...
~n[EO]n~ Posted October 9, 2007 Share Posted October 9, 2007 "shtml" isn't really anything much. It's a file extension (*.shtml) that is commonly used by servers to recognise an html file which includes something called Server Side Includes (SSI). Server Side Includes basically let you dump the contents of a file straight into an html document, if your server allows them. (They do a whole heap of other things to - like add the time at the servers location to the page and stuff) you must modify in the htaccess file in order to point to certain page if the error occurs, i think you didn't see this Their .htaccess is set up by default to go to 4xx.shtml error pages in that directory. You only have to change the .htaccess file if you want different behavior. Quote Link to comment https://forums.phpfreaks.com/topic/72247-help-on-cpanel-403/#findComment-365214 Share on other sites More sharing options...
oceans Posted October 9, 2007 Author Share Posted October 9, 2007 Thanks friend, I noted the file and the location, I can see it, it is where you mention it could be. OK, can you please do a code for me, i just want to redirect to a page when this happens that is all, I will modify your code. Thanks. all my files are php Quote Link to comment https://forums.phpfreaks.com/topic/72247-help-on-cpanel-403/#findComment-365267 Share on other sites More sharing options...
oceans Posted October 10, 2007 Author Share Posted October 10, 2007 Dear Friend, Can any one help, I dare to test & try, but I am pretty cautious and do not want to mess up things and get to more trouble as the web pages are live. Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/72247-help-on-cpanel-403/#findComment-365830 Share on other sites More sharing options...
oceans Posted October 11, 2007 Author Share Posted October 11, 2007 Any help please... Quote Link to comment https://forums.phpfreaks.com/topic/72247-help-on-cpanel-403/#findComment-366704 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.