Drupal使用IIRF具有不同的子文件夹和根网站,在IIS6上清理URL

HI! 在win 2003服务器上有一个IIS6,在www.example-one.com有一个网站。 我已经启用IIRF,一切工作得很好(还要感谢IIS上的Drupal干净的URL )

在同一台服务器上,我也有一个网站www.example-two.com/mysite。 但是我不能在这个上启用cleanURL。 如果我添加了为子文件夹build议的重写规则(与上面相同的链接),cleanURLS在这个网站上工作,但是停止在另一个上工作。 我想只有最后一行被执行。

我不是一个真正的系统pipe理员(我已经被分配来维护这个服务器,因为没有人会),任何人都可以帮我写适当的IIRF重写规则,以便在这两个网站上启用cleanURL?

非常感谢。

通过一些额外的研究,我了解到,“L”标志告诉IIRF如果当前匹配,则不再处理更多模式。 所以我的解决办法是从上面的线程修改iirf.ini如下:

# 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。