homepage Welcome to WebmasterWorld Guest from 54.198.130.203
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe to WebmasterWorld
Visit PubCon.com
Home / Forums Index / WebmasterWorld / Webmaster General
Forum Library, Charter, Moderators: phranque & physics

Webmaster General Forum

    
Force HTTP to HTTPS
rcshield




msg:3783797
 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




msg:3783834
 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




msg:3783855
 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