Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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

HI! I have IIS6 on win 2003 server with one website at I have enabled IIRF and everything works very well (also thanks to

On the same server I also have a website at but I cannot enable cleanURLs on this one. If I add the rewrite rules suggested for sub-folders (same link as above), cleanURLS work on this site, but stop working on the other. I guess only the last line is executed.

I am not a real sysadmin (I have been assigned to mantain this server because nobody else would), can anyone help me to write the proper rewrite rules for IIRF in order to enable cleanURLs on both sites?

Thanks a lot in advance.

share|improve this question
You should add your solution as an answer below. Then you should accept it after the waiting period for self-answers has expired. – Dennis Williamson Dec 15 '09 at 16:03
fixed. sorry for my noobiness thank you – user29185 Dec 16 '09 at 8:33
up vote 1 down vote accepted

With a bit of additional research, I learned that the 'L' flag "tells IIRF to process no more patterns if the current one matches". Therefore my solution was to modify iirf.ini from the above thread as follows:

# Do not pass to drupal if the file or directory exists
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]

# Handle query strings on the end
# firstly for the subfolder without the L flag
RewriteRule /mysubfolder/(.*)\?(.*)$ /mysubfolder/index.php\?q=$1&$2 [I]
# then for the root
RewriteRule /(.*)\?(.*)$ /index.php\?q=$1&$2 [I,L]

# now pass through to the generic handler
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# firstly for the subfolder without the L flag
RewriteRule ^/mysubfolder/(.*)$ /mysubfolder/index.php?q=$1 [I]
# then for the root
RewriteRule ^/(.*)$ /index.php?q=$1 [I,L]


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.