I want to have a custom 403 page in my project. So I added these codes in a .htaccess file:
Order deny,allow
Deny from all
Allow from 192.168.1.0/24
ErrorDocument 403 /403.htm
But when the project runs from an out of rang IP, and 403 error must be occurred, custom 403 page redirect does not work and I give another error too.
Forbidden
You don't have permission to access /app/ on this server.
Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
What is this problem for? I have read different articles inside StackOverflow and other websites, but none of them could not solve this problem.
ErrorDocument 403 /403.htm
are you sure the page is definitely present there/403.htm
you might have to provide full path to your error page. – Teletypewriter