Question

Bots getting a 403 when trying to access php pages Centos 7 and Apache

My site is working fine for regular visitors and web browsers, but my phpBBforum pages (it seems any URL with .php in it) is blocking access to bots with a 403. I have been troubleshooting for weeks and it seems it has to be Apache or some security setting on the server that is doing this. Any ideas? I saw a similar question from 8 years ago that went unanswered. Page in question for example is: https://usvi-on-line.com/travel-forum/viewforum.php?f=1

If you use the W3 validator https://validator.w3.org/check?uri=https%3A%2F%2Fusvi-on-line.com%2Ftravel-forum%2Fviewforum.php%3Ff%3D1&charset=(detect+automatically)&doctype=Inline&group=0 or https://websniffer.cc you can see the 403 -

Dying to solve this - Google won’t index my thousands of forum posts due to this issue -

Thanks!


Submit an answer
Answer a question...

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Bobby Iliev
Site Moderator
Site Moderator badge
December 26, 2022

Hi there,

There are a few things that I could suggest:

  • Check your .htaccess rules: If you have a .htaccess file in the same directory as the PHP file, there may be rules in the file that are causing the 403 error. Check the .htaccess file for any rules that might be blocking access to the PHP file.

  • Check the Apache configuration: The Apache configuration file (usually httpd.conf or a file included from it) may contain rules that are causing the 403 error. Check the configuration file for any rules that might be blocking access to the PHP file.

  • Check if you have SELinux enabled: If SELinux is enabled, it may be blocking access to the PHP file. You can check the SELinux logs for any messages related to the PHP file, or you can temporarily disable SELinux to see if it is the cause of the problem.

Best,

Bobby