search
HomeCommon ProblemHow 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/

Analysis of the command used:

ls -Z -d public_html/

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

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

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

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

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
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)
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
1 months agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),