|
|
Posted on 8/18/2017 10:00:43 AM
|
|
|
|

Here's the thing, yesterday the website was upgraded from http to https protocol
One of my software interfaces to access this website, such as:http://www.itsvse.com/api/test.php
If you access it directly with your browser, you will be automatically redirected to https://www.itsvse.com/api/test.php
However, my software code does not write code for automatic redirection, that is, the address where the software accesses my interface
will return a 301 status code, and the nginx default 301 error page,
In this way, the software cannot read the data from the interface, but I cannot change https back to the original http
Can nginx determine when you visit a specified page and return the specified content???
The answer is yes!!!!
This code is placed in the server, as far as possible
When we visit the /api/test.php page, nginx automatically returns a json string to the client, and the test result is as follows:
(default_type and add_header will get an error when added to it, I don't know why, but it doesn't affect haha)
|
Previous:Very easy to use transcoding tool [GBK-UTF8 interchange]Next:Sort strings a10, a2, a3, a6, a5, a4
|