Tip
Subject Content

106
Change the custom SSL error

Some administrators like to change the custom error message that is displayed, for example, when

Secure Sockets Layer (SSL) is required but the user has used http in the Web address instead of

https. Here's an easy change that automatically redirects the user to a secure site, instead of

displaying the "SSL required" error message.



First, create an .asp file (such as ssl.asp) and add the following code:



<%

Data = request.servervariables("QUERY_STRING")

URL = replace(Data, "403;", "")

URL = replace(URL, "http://", "https://")

response.Status = "200 OK"

response.redirect URL

%>



Then, follow these steps:



Open the Internet Information Manager console, right-click the site, and select Properties.

Select HTTP Error 403.4 from the Custom Errors tab, and click Edit Properties.

Select URL as the message type, and then type the URL to the .asp file you created. (It's easiest to

put this file on your root.)

Click OK to close the dialog box.



This method might not work for all Web sites--depending on the components you use on them--but

it's a start. You may prefer to manually change the custom error so that it provides users with a

more meaningful error message, rather than automatically redirecting your user.

Page 106 of 237
First Previous Next Last