Print Page | Close Window

HTTP to HTTPS

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: General Discussion
Forum Description: General discussion and chat on any topic.
URL: https://forums.webwiz.net/forum_posts.asp?TID=7095
Printed Date: 28 March 2026 at 6:52am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: HTTP to HTTPS
Posted By: Tegwin
Subject: HTTP to HTTPS
Date Posted: 08 November 2003 at 4:59am
I have a question on IIS. I have setup SSL and so now all my pages are working with https://  what I would like to do is to have it so that it automatically redirects to HTTPS even if someone types http://  Is there a way to do this in IIS




-------------
If you dont want my peaches, dont shake my tree



Replies:
Posted By: Mart
Date Posted: 08 November 2003 at 5:08am
There's no way in IIS but it is possible in asp. Wait a minute and ill write you can example


Posted By: Mart
Date Posted: 08 November 2003 at 5:18am
<%
If request.ServerVariables("HTTPS") = "off" Then
Response.Redirect("
https://www.yoursite.com - https://www.yoursite.com ")
End If
%>


Posted By: Tegwin
Date Posted: 08 November 2003 at 7:14am
Thanks Mart, I will give that a go.. Where do I need to put the script ?



-------------
If you dont want my peaches, dont shake my tree


Posted By: Mart
Date Posted: 08 November 2003 at 7:36am
Put it at the top of the page before any html is sent...



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net