I am using apache, and i have on my index page (index.php) a login and password field. The authentification is made with the login.php page and then if i am authaurize i can reach the next page home.php.
I want to secure the authentification with https, but only for the authentification, so i need to set up a url rewriting.
RewriteCond %{HTTPS} !on
RewriteCond %{REQUEST_URI} ^/login.php
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,QSA,L]
I have think about this solution but it doesn't work. I can enter my credentials on the index.php and then I am redirect to the login.php with https, but i still have to complete the login and password field.
Have you any idea ?