开发者

HTTP to HTTPS redirect not working on Apache with PHP

开发者 https://www.devze.com 2023-01-10 21:43 出处:网络
I have a script that handles several different redirects on a server with a snippet that looks like follows:

I have a script that handles several different redirects on a server with a snippet that looks like follows:

if($url == "http://www.url.com")
    {header("Location: https://www.url.com/index.html");}

The script works exactly as intended 开发者_运维技巧with one issue - all of the https redirects end up redirecting to http (versus the https as defined).

Does anyone have any ideas what may be going on?


The server you redirect to has a redirect of its own to http.

Nothing you can do about it, unless you are administering that server.


There was something else going on with the server, but it's been a while so I can't remember what it was anymore.

0

精彩评论

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