Problems redirecting to a secure URL with IIS 6.0

Topics: User Forum
Apr 26, 2010 at 8:26 PM
Hi, I am running IIS 6.0 in Windows Server 2003 SP2. I have installed IIRF 2.0 successfully. It shows as loaded in the ISAPI filter list and I am getting a log file generated. Hoever, what I thought should be something very simple is not working at alll. My site is Under this I have various directories and pages etc. including - this directory is set in IIS as 'needs a secure connection' so must be accesses as https://// All directories below this also are set to 'need a secure connection'. - this directory is additionally set to require user authentication with anonymous access disabled. What I'd like to do is to force any attempt to access to be redirected to So, I set up the following IIRF.ini file: RewriteEngine ON StatusUrl /iirfStatus RewriteLogLevel 4 RewriteLogFile c:\inetpub\IIRF\logs\live IterationLimit 5 RedirectRule ^*)$$1 [R=301] When I modify this file and save it then the next time I access a URL on this site I see the IIRF log entries saying that the INI file has been modified. However, when I attempt to access a URL involving 'secure' such as than all I get back is the IIS error saying that 'this site must be accessed over a secure channel, try typing https: at the start of the request'. Also, there are no records of the request in the IIRF log! it's almost like IIS is throwing the error about needing https *before* IIRF has had a chance to intercept and re-direct the URL. SI this possible? Or am I mis-configured somehow? Any advice or suggestions would be gratefully received as I am really stuck at this point. Thanks.
Apr 26, 2010 at 10:41 PM
Edited Apr 26, 2010 at 10:42 PM

yes, it' not configured properly.

You shouldn't put the scheme in the URL pattern.  RedirectRule (and RewriteRule) examines the URL Path, not the full URL.  This may be confusing, but this is how it works in Apache, and in pretty much every rewriter I know of.

You can test for the use of SSL in a RewriteCond.  Here's an example:

You'll want to use ^/secure  as the pattern on the RedirectRule.