Home Common Problem How to solve the 403 error on the web page?

How to solve the 403 error on the web page?

Mar 09, 2020 pm 04:54 PM
403 error

How to solve the 403 error on the web page?

Sometimes when we log in to certain websites, a 403 Forbidden error will pop up suddenly, causing the website to be unable to log in. Here is how to deal with this situation.

Methods to solve 403 forbidden errors:

1. Rebuild dns cache

For some common 403 forbidden errors, it is recommended that the first thing you try is to rebuild dns cache. Enter cmd, then enter ipconfig /flushdns. If that doesn't work, you need to parse the homepage in the hosts file.

2. Modify the folder security attributes

Use the following command to modify the folder security attributes

chcon -R -t httpd_user_content_t public_html/
Copy after login

Analysis of the command used:

ls -Z -d public_html/
Copy after login

3. About apache caused The solution to the 403 forbidden error

Open the apache configuration file httpd.conf and find this code:

Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Copy after login

Sometimes after configuring php, the "Deny from all" has rejected all connections. Change this line to "allow from all". The modified code is as follows, and the problem is solved.

Options FollowSymLinks
AllowOverride None
Order deny,allow
Allow from all
Copy after login

4. Solution to 403 Forbidden error in HawkHost space

Sometimes Mod security is installed on the shared server, and when the URL contains other sensitive characters such as "%", , will be blocked by Mod security

How to solve HawkHost 403 Forbidden error:

Add the following code in the .htaccess file:

SecFilterEngine Off
SecFilterScanPOST Off
Copy after login
Copy after login

Put it directly in the root directory of the website Or the directory where the program is running.

5. About the solution to the 403 Forbidden error caused by WordPress

For some blogs built using the WordPress management program, you need to modify the .htaccess file and add the following content at the end. , in fact, it is disable mod_security

SecFilterEngine Off
SecFilterScanPOST Off
Copy after login
Copy after login

In addition, dedecms may need to add another one so that the default access is the DirectoryIndex index.html of the index.html file.

Modify the .htaccess file, upload the file, and then reopen the URL where 403 Forbidden appeared before and the error will no longer occur.

The above is the detailed content of How to solve the 403 error on the web page?. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)