Page 1 of 1

Change default error 403 page?

PostPosted: 28. July 2012 22:22
by FileGeek
Image

Is there anyway to change that to say something else like This website is now closed?

Due to not wanting certain users to know they're banned by IP ahha

Re: Change default error 403 page?

PostPosted: 29. July 2012 01:00
by JonB
OK - Simple Answer:

\xampp\apache\error\HTTP_FORBIDDEN.html.var is the template file that is used for that message.

You can make changes to that file to change the output text. You may also need to make changes to the 'include' files as well.

Just remember the message they receive is driven by their browser/OS language choice, so if you have 'global' traffic - you will need to make multiple changes.

Good Luck
8)

Re: Change default error 403 page?

PostPosted: 29. July 2012 01:57
by Altrea
JonB posted one common and possible solution.

Another one would be to define a new error document depending on for example on a specific application.
For that Apache knows the directive ErrorDocument.
This directive can be used in .htaccess Files or VirtualHost definitions too.

best wishes,
Altrea