| 
        php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             
             [2013-02-22 09:36 UTC] laruence@php.net
  [2013-02-22 09:36 UTC] laruence@php.net
 
-Status: Open
+Status: Feedback
  [2013-02-26 02:57 UTC] wynn dot chen dot cn at gmail dot com
  [2013-10-15 11:54 UTC] pecl-dev at lists dot php dot net
  | 
    |||||||||||||||||||||||||||
            
                 
                Copyright © 2001-2025 The PHP GroupAll rights reserved.  | 
        Last updated: Tue Nov 04 12:00:01 2025 UTC | 
Description: ------------ yaf2.2.9,IIS7 + Url Rewrite Module 2(最新版本) plugin中尝试输出 $request->getRequestUri() 查看永远是 string(0) "" 使用的rewrite规则等价于Apache下的 RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule .* index.php web.config对应代码为: <rule name="master" stopProcessing="true"> <match url=".*" /> <conditions> <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> </conditions> <action type="Rewrite" url="/index.php" logRewrittenUrl="true" /> </rule> 根据微软的文档(http://www.iis.net/learn/extensions/url-rewrite-module/url-rewrite-module-configuration-reference#Preserving_Original_URL),原始请求url保留在$_SERVER['HTTP_X_ORIGINAL_URL'],实测此项值正常。 看源代码似乎用了和zend framework类似的判定方案(/request/http.c 53行起)。实测$_SERVER中并没有“HTTP_X_REWRITE_URL”这一项,只有“HTTP_X_ORIGINAL_URL”,另外“IIS_WasUrlRewritten”这项永远是null,微软的文档内也未见相关说明。 Test script: --------------- 例:访问 http://www.example.com/subdirectory/st/action/ 在plugin中: var_dump($request->getRequestUri()); Expected result: ---------------- string(24) "/subdirectory/st/action/" Actual result: -------------- string(0) ""