Feed on
Posts
Comments

To redirect all HTTP requests to HTTPS with ISAPI Rewrite you can use the following rewriting rules in your httpd.ini file:

# redirect all http requests  to https
RewriteCond  %HTTPS (?!on).*
RewriteCond Host: (.*)
RewriteRule (.*) https\://$1$2 [I,RP]

,
Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • dzone
  • Netscape
  • digg
  • YahooMyWeb
  • Technorati

6 Responses to “Redirect all HTTP requests to HTTPS with ISAPI Rewrite”

  1. on 03 Jun 2007 at 2:28 am Boris Yeltsin's Zombie

    Thank you! I was stuck trying to figure this one out on my server.

  2. on 04 Aug 2007 at 1:16 pm Sunita

    This work fine to redirect http to https, how to redirect request from https to http, say when we have certain url patterns /xyz/* to be redirected to http and others to https

  3. on 19 Sep 2007 at 7:06 pm shal

    Hi,

    Can someone please reply a simple syntax for rewriting url without file extension and trailing variable can be rewritten as folders. I am aware of the examples in website and forums but still struggling to get it working. Kindly it will be highly appreciated if someone can reply to the query and also if you can tell the ways I can check my Isapi working.

    Kind regards,

    ShalRiedel

  4. on 21 Sep 2007 at 4:17 pm Ivan Uzunov

    Is this what you are looking for?

    RewriteRule /([^?/]+)/popular/?\??(.*) /$1/default.aspx?page=PopularItems&$2 [I,L]

    The sample above uses virtual directory. This is the same sample without virtual directory:

    RewriteRule /popular/?\??(.*) /default.aspx?page=PopularItems&$1 [I,L]

  5. on 29 Oct 2007 at 7:14 am Brent Lagerman

    I’m just using ISAPI for the first time to rewrite my .html urls to .php

    Here’s something I found that works with apache using mod_rewrite:

    # Redirects .html to .php
    Options +FollowSymLinks
    RewriteEngine on
    RewriteRule ^(.*).html$ $1.php [QSA,L]

    I do understand regex somewhat, but I don’t really know what the QSA,L means, does anyone know how to rewrite this for ISAPI? Any help is greatly appreciated.

    b r e n t

  6. on 02 Nov 2007 at 6:02 am Brent Lagerman

    nevermind, anyone looking to use mod_rewrite with .htaccess files on IIS should just get ISAPI 3.0 which allows you to use apache style mod_rewrite rules.

    b r e n t
    mimoYmima.com

Trackback URI | Comments RSS

Leave a Reply

This is a captcha-picture. It is used to prevent mass-access by robots. (see: www.captcha.net)

You must read and type the 5 chars within 0..9 and A..F, and submit the form.

  

Oh no, I cannot read this. Please, generate a