Custom 403 error page

  • wpas
  • Proficient
  • Proficient
  • User avatar
  • Posts: 321
  • Loc: Canada

Post 3+ Months Ago

Hi All

Hopefully someone can help me here

I created a custom 403 error page

In the htaccess file I specified the location.

In my htaccess file I added a statement to ban some bad IPs.
I also added a Rewrite Condition to ban som bot user agents.

If I test my site using a banned IP, my custom 403 error page is displayed.

If I test my site using a bad bot user agent my custom 403 is not displayed. It looks like the default 403 Forbidden page as shown below:

Code: [ Select ]
Forbidden

You don't have permission to access / on this server.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
  1. Forbidden
  2. You don't have permission to access / on this server.
  3. Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.


Can someone explain why my custom 403 is not displayed in this case.

Thanks
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • Zealous
  • Guru
  • Guru
  • User avatar
  • Posts: 1240
  • Loc: Sydney

Post 3+ Months Ago

could the bot user agent be sending a different request to apache?
  • wpas
  • Proficient
  • Proficient
  • User avatar
  • Posts: 321
  • Loc: Canada

Post 3+ Months Ago

I simulate the bad bot using my browser
  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13502
  • Loc: Florida

Post 3+ Months Ago

Maybe the ban is being applied to your 403 page. I don't remember the precedence of "allow/deny" configuration options off the top of my head, but I'd try specifically allowing access from ALL for that 403 page.
  • wpas
  • Proficient
  • Proficient
  • User avatar
  • Posts: 321
  • Loc: Canada

Post 3+ Months Ago

I added the following:

Code: [ Select ]
<Files /403.php>
  Order Allow,Deny
  Allow from all
</Files>
  1. <Files /403.php>
  2.   Order Allow,Deny
  3.   Allow from all
  4. </Files>


It did not help

Do I need to add something else

Post Information

  • Total Posts in this topic: 5 posts
  • Users browsing this forum: No registered users and 117 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.