• Hi, I tryed to create a 403-forbidden-php-file and it was failed.

    I just copyed the 404.php, changed the message and renamed to 403.php. Then I add “ErrorDocument 403 index.php?error=403” to my .htaccess file.

    But it still shows the usual Forbidden-Site and added following message:

    “Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.”

    Can somebody explain it me how to fix it?

    Thank you very much

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi, in your .htaccess file you can define the custom error pages. These can be already set up by you hosting company/provider (for example 403.shtml). By using the .htaccess file you’ll override the default settings and this makes it possible to create your own custom designed error pages. The example below show error files in the root of your website directory.

    # BEGIN Error Documents
    ErrorDocument 400 /400.php
    ErrorDocument 401 /401.php
    ErrorDocument 403 /403.php
    ErrorDocument 404 /404.php
    ErrorDocument 500 /500.php
    # End Error Documents

    Wouldn’t they show the error document’s url if you use this method though? How can you make it so the url stays the same as whatever someone entered?

    Nevermind. I figured it out. They only show the full path if you start with https://.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to create a custom 403-forbidden?’ is closed to new replies.