1

HI! I have IIS6 on win 2003 server with one website at www.example-one.com. I have enabled IIRF and everything works very well (also thanks to Drupal clean URL on IIS)

On the same server I also have a website at www.example-two.com/mysite. 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.

user29185
  • 21
  • 4

1 Answers1

1

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]

HTH.

user29185
  • 21
  • 4