Redirect all HTTP requests to HTTPS with ISAPI Rewrite
April 24th, 2007 by Ivan Uzunov
To redirect all HTTP requests to HTTPS with ISAPI Rewrite you can use the following rewriting rules in your httpd.ini file:
ISAPI Rewrite, URL Rewriting# redirect all http requests to https
RewriteCond %HTTPS (?!on).*
RewriteCond Host: (.*)
RewriteRule (.*) https\://$1$2 [I,RP]




Thank you! I was stuck trying to figure this one out on my server.
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
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
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]
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
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