homepage Welcome to WebmasterWorld Guest from 54.237.98.229
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / WebmasterWorld / Webmaster General
Forum Library, Charter, Moderators: phranque

Webmaster General Forum

    
Force HTTP to HTTPS
rcshield

5+ Year Member



 
Msg#: 3783795 posted 12:04 am on Nov 11, 2008 (gmt 0)

How do I force a Web page to display in HTTPS? I am not using Apache - I am using Microsoft IIS 5.0.

 

caribguy

WebmasterWorld Senior Member 5+ Year Member



 
Msg#: 3783795 posted 1:52 am on Nov 11, 2008 (gmt 0)

I don't know if you can have IIS include a piece of code like this snippet of Pythonscript. This is executed during every request.


request = context.REQUEST
if request.URL.find('manage.example.com') == -1: # skip all if management hostname
..if request.URL.find('example.com/shop') != -1: # skip rest if not browsing the shop
....if request.URL[0:5] != 'https':
......request.setServerURL('https', 'secure.example.com', '443')
......return request.RESPONSE.redirect(context.absolute_url(), status=301, lock=1)
..else: # not in shop
....if request.URL[0:5] != 'http:':
......request.setServerURL('http', 'www.example.com', '80')
......return request.RESPONSE.redirect(context.absolute_url(), status=301, lock=1)

bill

WebmasterWorld Administrator bill us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 3783795 posted 2:42 am on Nov 11, 2008 (gmt 0)

  • How To Set Up an HTTPS Service in IIS [support.microsoft.com]
  • How to enable SSL for all customers who interact with your Web site in Internet Information Services [support.microsoft.com]
  • Global Options:
     top home search open messages active posts  
     

    Home / Forums Index / WebmasterWorld / Webmaster General
    rss feed

    All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
    Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
    WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
    © Webmaster World 1996-2014 all rights reserved