开发者

Specific pages as always https and some others always http

I want a few pages on my website to be always https and other pages to be always http.

If s开发者_如何转开发omeone visits the https page with http://, he should be redirected to https and vice versa, if someone visits the page meant to be over http:// with protocol https:// he should be redirected to http version


Use $_SERVER['HTTPS'] to detect if the user is already on an https connection, otherwise redirect using a 301 - Moved Permanently (all future requests should go to the intended https URL). Example for redirection is here.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜