I am trying to make the web server to redirect all users from http to https. This is the code I am using:
RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_HTTPS} !=on
RewriteRule ^(.*)$ https://%{SERVER_NAME}/$1 [R=301,L]
However, I've realized that when users send a request with information to http initially, after that this rewrite rule has executed, the POST data seems to be lost.
Is there any way to, when rewriting to HTTPS, make sure that all POST data is sent as well.