• Welcome to Web Hosting Forum - A Web Hosting Community for Webmasters.
 

Recommended Providers



WordPress Hosting

Jetpack
Fully Managed WordPress Hosting
lc_banner_leadgen_3
Fully Managed WordPress Hosting

WordPress

WordPress Hosting Divi WordPress Theme
WPZOOM
Bluehost WordPress Hosting

Forum Membership

Forum Membership

403 error please help me

Started by Chris, March 28, 2024, 02:50:12 PM



Chris

Hi
One of the websites on the server throws a 403 error every few hours. When we investigate, we see the following codes added to the .htaccess file:

<FilesMatch ".*\.(py|exe|phtml|php|PHP|Php|PHp|pHp|pHP|phP|PhP|php5|PHP5|Php5|PHp5|pHp5|pHP5|phP5|PhP5|php7|PHP7|Php7|PHp7|pHp7|pHP7|phP7|PhP7|suspected)$">
Order Allow,Deny
Deny from all
</FilesMatch>

We have donea lot of troubleshooting but haven't been able to resolve it. Please help. This website is using WordPress.

Thanks!

webhostingworld

Ensure that the .htaccess file itself has appropriate permissions. It should typically be writable only by the owner to prevent unauthorized modifications.

ownwebservers1

The 403 error occurring on your WordPress website is likely due to the presence of the code snippet you provided in the .htaccess file. This code is blocking access to specific file types associated with programming languages like Python, PHP, and more. Since WordPress uses PHP, this code is causing the 403 error.

To resolve this issue, you need to remove or comment out the problematic code snippet in the .htaccess file. You can do this by following these steps:

Connect to your server via FTP or SSH.
Locate the .htaccess file in the WordPress root directory.
Open the file and search for the code snippet mentioned above.
Replace the code with a "#" at the beginning of the line to comment it out, or delete it entirely.
Save the changes and upload the modified .htaccess file back to the server.
After completing these steps, the 403 error should no longer occur on your WordPress website.


WordPress Hosting