Psst! Did you know DevelopmentNow is a mobile web site design agency?

Contact us for help mobilizing your site, or to sign up for our beta Mobile Web SDK!
all groups > inetserver iis > september 2007 >

inetserver iis : Problems with redirect from HTTP to HTTPS


Limbo
9/27/2007 6:11:02 AM
I assume this has something to do with IIS, as I get the same problem when
redirecting with ASP.Net

I am trying to make a redirect from http://www.netmidlan.fo to
https://www.netmidlan.fo/nm/SignOn/SignOn.aspx

Notice, the 2nd is HTTPS.

But somehow, HTTPS gets converted to HTTP somewhere in ASP / IIS.

Have this code in test.asp:

<%
Response.Write("https://www.netmidlan.fo/nm/SignOn/SignOn.aspx")
response.Write("<BR>")
response.Write("https://www.netmidlan.fo/")
response.Write("<BR>")
response.Write("https://www.zenit.fo/")
%>

When viewed, I get:

http://www.netmidlan.fo/nm/SignOn/SignOn.aspx
http://www.netmidlan.fo/
https://www.zenit.fo/

See http://www.netmidlan.fo/Test.asp for example

Notice, HTTPS has been changed to HTTP for my domain (NetMidlan.fo) but not
for other domains (zenit.fo).

What do I do? Why does this happen? How can I do it so that it works? Any
JDMnAR
9/27/2007 9:39:01 AM
Have you tried the method mentioned in MS KB Article Q239875?

http://support.microsoft.com/default.aspx?scid=kb;EN-US;q239875


[quoted text, click to view]
.._..
9/27/2007 2:42:59 PM
Are you using redirect code that you wrote, or code you picked up off the
internet somewhere.

I might suggest just going to find a different code sample and seeing if you
can get that to work. Pulling the "s" out of the response.Write is not
something IIS is going to be doing. That's an application doing that, or an
ISAPI filter, or just bad code.

If you can't get it to work, use other means to redirect. (JavaScript, or
set up a separate web site running port 443, and a separate site running
port 80 that redirects to the port 443 one.)

[quoted text, click to view]

Limbo
9/27/2007 2:56:01 PM
Yes. I've tried that.

Tried a javascript redirect right now, with same result.

Either it is some filter in IIS that doesn't want to server the string
https://www.domain.com/ or there is a filter on our ISA server that does this.

I will ask our network admin to check the ISA setup, to see if it has some
option for this.

Limbo

[quoted text, click to view]
AddThis Social Bookmark Button