Clean permalinks and mod_rewrite support for IIS
|Reported by:||man999||Owned by:||ryan|
In wp-settings.php you have recently introduced a very important improvement that allows Wordpress clean permalinks to work with the two major url rewriting tools, IIS Mod-Rewrite, and ISAPI_Rewrite.
However the condition
if ( empty( $_SERVER['REQUEST_URI'] ) )
in line 29 does not always work properly. PHP 5.2.x always sets the server variable REQUEST_URI, preventing the execution of the supportive code for IIS url rewriting.
My suggestion is to replace this condition with the following one:
if ( empty( $_SERVER['REQUEST_URI'] ) || substr( $_SERVER['SERVER_SOFTWARE'], 0, 13 ) == 'Microsoft-IIS' )
This condition, will accuratelly recognize IIS. I have tested this on IIS versions 5, 6, and 7, and it works perfect on all of them.
Change History (39)
8 years ago
- Keywords needs-patch added
- Milestone changed from 2.6 to 2.5
- Version set to 2.5
- Component changed from General to Permalinks
- Owner changed from anonymous to ryan
6 years ago
- Keywords needs-testing added
- Milestone changed from 2.9 to 2.8.1
- Type changed from enhancement to defect (bug)