If you get "Secure Channel Required", then the URL for the custom error is
still configured to require SSL when you do not want it to be.
What you need to do is:
1. Enable "Require SSL" for the vdirs that you need to force SSL
2. Configure the 403.4 custom error effective for the URLs under #1 to point
to another URL that will execute your Custom Error redirector page that
sends a 302 redirection to the appropriate HTTPS version
3. Disable "Require SSL" for the Custom Error redirector page in #2
#1 forces all non-SSL requests to get the 403.4 custom error. #3 allows the
non-SSL requests to execute the Custom Error redirector page of #2 to send
the redirection.
BTW, your code is incorrect. The redirect URL is invalid. This should be all
you need (if you want to get fancier, you can read the querystring to locate
the original URL, and redirect to the HTTPS version of the original URL).
<%
If Request.ServerVariables("SERVER_PORT")=80 Then
Dim strSecureURL
strSecureURL = "https://"
strSecureURL = strSecureURL &
Request.ServerVariables("SERVER_NAME")
Response.Redirect strSecureURL
End If
%>
--
//David
IIS
http://blogs.msdn.com/David.Wang This posting is provided "AS IS" with no warranties, and confers no rights.
//
[quoted text, click to view] "MayahLynn" <MayahLynn@discussions.microsoft.com> wrote in message
news:E82FD5AC-F999-47DA-BF5D-AB0936F6436D@microsoft.com...
Thanks for the advice and please excuse my ignorance but I am having trouble
creating the correct page with the correct scripting.
I have tried the advice in MS KB Article 555126 and used the script below in
a virtual directory under the site I am configuring. I removed the "Require
SSL" from the directory and changed the Error page to point to the virtual
directory page. This did not work. I received "Secure Chanel Required" error
<%
If Request.ServerVariables("SERVER_PORT")=80 Then
Dim strSecureURL
strSecureURL = "https://"
strSecureURL = strSecureURL &
Request.ServerVariables("SERVER_NAME")
strSecureURL = strSecureURL & "https://www.bcmclaims.com"
Response.Redirect strSecureURL
End If
%>
I also tried:
<% if (String(Request.ServerVariables("httpS")) == "off")
Response.redirect("https://www.bcmclaims.com"); %>
Also I forgot to add that I am hosting a Dotnetnuke Site but I really don't
think it matters because the SSL works perfect I just cant get it to
redirect.
Thanks again.
[quoted text, click to view] "Ken Schaefer" wrote:
> Create a custom 403.4 error handler page that does the redirect (either
via
> ASP's/ASP.NET's Response.Redirect, or client-side via
> javascript/meta-refresh). Just ensure that the 403.4 error page doesn't
> require SSL itself!
>
> Cheers
> Ken
>
> --
> IIS Blog:
www.adopenstatic.com/cs/blogs/ken/ > Web:
www.adopenstatic.com >
> "MayahLynn" <MayahLynn@discussions.microsoft.com> wrote in message
> news:5CB20A8C-B7A0-48C8-A1EC-E900114D508A@microsoft.com...
> :I have SSL configured and working on a Windows 2003 server with IIS 6.0.
I
> : can view my website with the https:/ but when you type my domain
> :
www.mydomain.com it gives me the HTTP Error 403.4 - Forbidden: SSL is
> : required to view this resource. How do I get mywebsite to automaticly
> : redirect to the https://.
> :
> : Thanks in Advance for any help provided!
>
>
>