Jump to content

help on cpanel (403)


oceans

Recommended Posts

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.

 

Link to comment
Share on other sites

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.
Link to comment
Share on other sites

 

"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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.