views:

46

answers:

1

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?

A: 

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.

Avel
Is there a way or something I should be looking for to verify that?
Yazmin
Use something like HTTPFox (https://addons.mozilla.org/en-US/firefox/addon/6647/) to view the headers/bodies of all requests performed by the browser. If the HTTPS pages are doing their own redirect, you'll be able to winkle out how/when from that.
Marc B