I have a website set up that uses the redirect method...
server {
listen 80;
server_name example.org;
return 301 https://$server_name$request_uri;
}
However when a page is posted to "http://example.com" it redirects to "https://example.com" and in the process, it strips the POST.
I recognize this is how it works, however I need to somehow do one of the following...
Any suggestions? I'm a bit lost...
If you are willing to forgo the "permanent" redirect status, I believe a 307 redirect instead of a 301 will preserve the POST. There actually is a redirect that is permanent and preserves the post, a 308, but it isn't well adopted yet by browsers and other user agents.
A 308 redirect is a fix, but the solution is to POST directly to https:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With