With the final release of Drupal 4.7 there seems to be some new code added (was not present in any RC) which tries to test for Clean URL compatibility which causes some issues when using ISAPI Rewrite on IIS with Drupal. The ISAPI rules I use work fine with Drupal once I bypass this test, the problem is that the method used to test for clean URL's is dependent on .htaccess.
This new code present on lines 291~300 (inclusive) in system.module tests for clean URL's, but this code is what generates the test URL;
'<a href ="'. str_replace('?q=', '', url('admin/settings', '', 'clean_url')) .'">'. t('Run Clean URL Test') .'</a>'
Problem with this code is that ISAPI Rewrite does not have the ability to check for file existance like .htaccess does. This means that when using the .htaccess the index.php portion of the string is removed, but not when using ISAPI rewrite. The results of which means you'll get a URI stem like this when using IIS with ISAPI Rewrite;
And this when using Apache with the Drupal .htaccess rules;
Obviously the IIS one is not going to work.
The fact that Drupal tests specfically for a .htaccess based rule isn't so much a problem, as it has always been this way. The difference is that you used to be able to execute this SQL directly against your Drupal database using PHPMyAdmin (or similar) to effectively bypass that test;
SELECT * FROM variable v WHERE v.name = 'clean_url';
UPDATE variable SET value = 's:1:"1";' WHERE name = 'clean_url';
However, now you are unable to enable Clean URL's in Drupal even if you manually set it to be enabled directly in the database as system.module now overides that setting if the Clean URL test fails (which it always will with ISAPI Rewrite on IIS).
I'll try and take a closer look in the next few days to write a specific rule for ISAPI Rewrite for this new test, but currently the only solution for those using Clean URL's with IIS and ISAPI Rewrite is to manually remove/comment out lines 291~300 (inclusive) in system.module (or download attached modified version) which effectively removes Clean URL testing. This will revert the Clean URL setting to the same way it was in all the RC versions, so be sure that your ISAPI Rewrite rules are setup or your site will be cactus.
To make things more straight forward for us IIS users, would it please be possible to place this Clean URL test in an
if statement that checks the
_SERVER["SERVER_SOFTWARE"] PHP variable for the existance of Apache before being executed? That way the test still works for Apache users, but us IIS users don't have to go digging through code and stripping out bits just to get Clean URL's to work.