This article is a mirror article of machine translation, please click here to jump to the original article.

View: 2912|Reply: 0

[Web] Nginx intercepts all requests and returns the same response content

[Copy link]
Posted on 12/31/2023 9:19:50 AM | | | |
Requirements: The website is closed, the website contains various links, and when the user visits the website, different links return the same announcement information (the same response information).


Review:

Introduction to Nginx location configuration priority
https://www.itsvse.com/thread-10694-1-1.html


Let's take a look at the renderings first:



The same HTML information is returned regardless of the path to the site accessed.

First, create a new one on the server/data/wwwroot/downdirectory, create a new index.html file, as follows:

Then the Nginx configuration is as follows:

Reference:The hyperlink login is visible.




Previous:PHP gets all the header information
Next:CentOS uses Alibaba Cloud NAS storage
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com