Rewrite works, but logging and StatusUrl doesn't?

Topics: User Forum
Dec 11, 2009 at 3:51 PM


I've just installed IIRF 2.0 on a win2003 (IIS 5) box, ostensibly to get the index.php segment out of urls in a CodeIgniter install.

It seems to work; that is, my URLs now work without the index.php segment. However, I'm getting nothing written to my the log location, and the statusUrl is giving a 404.

Install is:


contains IIRF.dll and IifrGlobal.ini - the ini file is empty, 0kb.


contains IIRF.ini - this reads:

RewriteLog c:\Temp\iirfLog.txt
RewriteLogLevel 1

StatusUrl /iirfStatus

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?/$1 [L]


So... nothing is written to log, and returns a 404 - what am I missing?

Dec 11, 2009 at 9:11 PM
Edited Dec 11, 2009 at 9:12 PM

First - Just FYI - The RewriteLog directive specifies the stub of a log name, not the actual filename.  From the looks of your config, it seems like you might be looking for a log file in c:\temp\IirfLog.txt.  That won't happen.  The actual name of the log file is <stub>.<pid>.log, where <stub> is the part you provide, and <pid> is the process id, which is different for each IIS worker process. Every time you restart IIS, you'll get a new log file, or a new set of logfiles if you have multiple worker processes. This is all in the documentation.

The above might explain why you don't think you are getting an IIRF logfile.

There are also other possible reasons.  If IIS doesn't have CREATE permissions on the directory c:\temp, you will get no logging.  This is also a common problem.  To fix that you will need to grant appropriate permissions to the WPG group (and maybe NetworkService) to the c:\temp dir, or where-ever you decide to put the IIRF log file.

But, even if IIS cannot create the logfile, if all the configuration is ok, the rewriting will work, and iirfStatus should still work. 

The next mystery - iirfStatus.  The main reason /iirfStatus won't work is that it is not accessible, by default, from remote addresses.   By default, you must use http://localhost/iirfStatus from the local server machine, in order to see the status report.  If you try, it will give you a 404, by design.  This is a security/privacy feature.  You can enable remote access for iirfStatus, if you like, by appending "RemoteOk" to the StatusUrl directive, like this:

  StatusUrl  /iirfstatus  RemoteOk

This is also explained in the documentation.

ps: WS2003 is IIS6. You had written IIS5.



Dec 21, 2009 at 11:38 AM

Thanks very much - you are of course right, and it's all in the documentation. My confusion has abated.

Happy Christmas :)