Difference between POST and the end slash in the URL.
When debugging an interface, the php file name is index. php, which is placed under the directory/checkmail.
The url for access is/checkmail, and the post method of JQuery is used for calling.
It was found that the passed parameters were not passed during the call.
After tracking all the passed parameters, we found that $ _ SERVER ['request _ method'] obtained is GET.
It is clearly called by POST. Why is GET obtained?
Baidu did not find the answer.
Then various attempts were made. Finally, the backslash/was added in the called url, and the parameter was obtained.
That is to say,/checkmail and/checkmail/are different.
Continue to Baidu, and find that there is more to SEO with no slash added.
When the Web server receives a url request that does not contain a slash at the end, for example. When the Web server receives a request with a slash at the end, the request is processed directly as a directory.
Simply put, when the browser parses a url such as/checkmail, the server will execute 301 to/checkmail/. Both links are valid, but the second method is faster. Of course, this shift time is generally invisible and can be ignored. For search engines, these two addresses may be included at the same time.
That is to say, when using/checkmail/for access, because there is no checkmail file, it is switched to the/checkmail/directory, and the homepage of/checkmail/, that is, index. php, is called.
Because of the redirection, the POST data may not be switched to/checkmail/in POST mode due to server configuration /.
This should be the problem. Check whether the server configuration is correct or not.
It is clear that, if there is a difference between POST calling/checkmail/AND/checkmail, it is better to unify it into a unique URL.