how in htaccess can i redirect the user to https from http and back again

后端 未结 1 1018
南笙
南笙 2021-01-23 17:12

I\'m trying to get a login page to redirect to https and all other pages revert to standard http. When I have /login as the address, it shows up as /index.php?page=login and isn

1条回答
  •  不思量自难忘°
    2021-01-23 17:27

    It's probably better to do this at the application level, that is, send the "login" link as an HTTPS link directly.

    The problem with redirects from HTTP to HTTPS is that the client first makes the request over plain HTTP. In the case where it's only going to the HTTPS initial page, it's not necessarily a problem, but if you send the credentials in an HTTP request that's transparently redirected to an HTTPS page, they'll have been leaked anyway.

    0 讨论(0)
提交回复
热议问题