C
c676228
Hi all,
I am trying to set this up using asp code and IIS configuration. But it
seems not working. Here it is the way I am doing.
In IIS I set up a virtual directory with secure communication, I checked
require secure channel, require 128-bit encryption. In custom error, instead
of using default message
HTTP 403.4 - Forbidden: SSL required
Internet Information Services
in iishelp 403.4htm, I am trying to do redirect automatically.
so I have a small code from internet like this in my virtual directory:
redirect.asp
<%If Request.ServerVariables("SERVER_PORT")=80 Then
Dim strQUERY_STRING
Dim strSecureURL
Dim strWork
' Get server variables
strQUERY_STRING = Request.ServerVariables("QUERY_STRING")
' Fix the query string:
strWork = Replace(strQUERY_STRING,"http","https")
strWork = Replace(strWork,"403;","")
' Now, set the new, secure URL:
strSecureURL = strWork
'response.write(strSecureURL) ' uncomment for sanity check.
Response.Redirect strSecureURL
End If %>
But it seems not working, it only have a message like this:
With custom error set up URL to /myvirtualdirectory/redrect.asp
I got this error message:
Secure Channel Required
This Virtual Directory requires a browser that supports the configured
encryption options.
If I set up custom error file to redirect.asp, this file will be displayed,
it seems this points to the right place, it just somehow didn't executed.
can you give me a clue?
Thank you.
Betty
I am trying to set this up using asp code and IIS configuration. But it
seems not working. Here it is the way I am doing.
In IIS I set up a virtual directory with secure communication, I checked
require secure channel, require 128-bit encryption. In custom error, instead
of using default message
HTTP 403.4 - Forbidden: SSL required
Internet Information Services
in iishelp 403.4htm, I am trying to do redirect automatically.
so I have a small code from internet like this in my virtual directory:
redirect.asp
<%If Request.ServerVariables("SERVER_PORT")=80 Then
Dim strQUERY_STRING
Dim strSecureURL
Dim strWork
' Get server variables
strQUERY_STRING = Request.ServerVariables("QUERY_STRING")
' Fix the query string:
strWork = Replace(strQUERY_STRING,"http","https")
strWork = Replace(strWork,"403;","")
' Now, set the new, secure URL:
strSecureURL = strWork
'response.write(strSecureURL) ' uncomment for sanity check.
Response.Redirect strSecureURL
End If %>
But it seems not working, it only have a message like this:
With custom error set up URL to /myvirtualdirectory/redrect.asp
I got this error message:
Secure Channel Required
This Virtual Directory requires a browser that supports the configured
encryption options.
If I set up custom error file to redirect.asp, this file will be displayed,
it seems this points to the right place, it just somehow didn't executed.
can you give me a clue?
Thank you.
Betty