Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My clients have two sites (call them, say, mainsite and subsite) that are run as subscription services. They want clients to be able to access subsite only if they've got a paid subscription on their main site, so anyone accessing subsite directly or not through mainsite should get redirected to mainsite (to buy a subscription).

I've been tasked with handling this redirection, and since their servers are running on Windows Server 2003 with IIS 6, I installed IIRF (Ionic ISAPI Rewrite Filter) on the subsite server to handle rewrites and redirects. The subsite Iirf.ini file contains the following:

# Enable logging.
RewriteLogLevel 1
RewriteLog D:\sites\subsite\Files\IIRFLog

# Enable services.
RewriteEngine ON
StatusInquiry ON
IterationLimit 5

# Redirect to main site.
RewriteCond %{HTTP_REFERRER} ^https?://(?!mainsite)([-\w]*\.)(?!mainsite)\S*$ [I]
RedirectRule ^(.*)$

# Add `www.` to URLs.
RewriteCond %{HTTP_HOST} ^(subsite\.com).*$ [I]
RedirectRule ^/(.*)$$1 [I,R=301]

# URL rewrites for WordPress pretty permalinks.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^/(.*)$ /index.php/$1 [L]

(Of course, mainsite and subsite are substituted for real domains.)

The problem is, however, that when I enable IIRF on the server, it completely stops serving pages (in Firefox, the error given is that the server reset the connection). No redirects happen, and no log files are written to the given log file location.

The configuration is completely valid according to the bundled TestDriver and TestParse programs, so what might be going wrong?

share|improve this question
up vote 0 down vote accepted

It turns out that while our server runs on the 64-bit version of Windows Server, our IIS installation is running in 32-bit mode. Running through the Windows Event Log revealed that we had the 64-bit version of IIRF. The 32-bit version wouldn't install on our server (sensibly enough), so a manual installation got it to work.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.