Create a redirect to force SSL secure mode

Place the code below at the beginning of your .ASP home page.  If you do not have a home page using ASP create a text file, place the code in it and save it as default.asp.  

*remember to replace the "domainname.com" with your actual domain name.  

<%
ServerName = Request.ServerVariables("SERVER_NAME")
SecurePort = Request.ServerVariables("HTTPS")

'response.write ServerName & "<<<br>" ' Response domain
'response.write SecurePort & "<<<br>" ' Response is on or off

If InStr(1, SecurePort, "off", vbTextCompare) = 1 Then
Response.Redirect "https://www.domainname.com"
End If
%>

  • SSL, Redirect, ASP
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Where can I find documentation for ServerObject's AspMail component?

This documentation can be found at: http://www.serverobjects.com/products.html For...

How do I upload files through my web pages?

You can use Software Artisan's SAFileUP. This is an ASP component that allows you to upload files...

What is PageCounter and how do I use it?

About Page Counter PageCounter is an object that counts and displays the number of times a Web...

How do I setup Microsoft Outlook Express to read my e-mail?

Follow these steps: Open Microsoft Outlook Express. From the Tools menu, click...

How do I setup Netscape Messenger to read my e-mail?

Follow these steps: Open Netscape Navigator. Click the Edit menu and then click Preferences......