我想重寫URL在我的IIS 7.0服務器使用URL重寫模塊,但它不工作。URL重寫:服務器不重寫
我必須建立一個規則,用於從第三方認證頁面接收URL,並在調用我的頁面時使用「; jsessionid = null」標記來引發IIS中的錯誤。我試圖只刪除「; jsessionid = null」語句。我需要URL查詢語句到我的應用程序(preceeding question)。
我寫這條規則:
模式:
(http://.*);jsessionid=null(.*)
操作:
{R:1}{R:2}
當我測試的模式,結果是好的。但實際上,沒有任何事情發生,就像沒有重寫模塊一樣。在Web.config文件好像是沒事:
<system.webServer>
<modules runAllManagedModulesForAllRequests="true" />
<rewrite>
<rules>
<rule name="refazer_url_autenticador_df" enabled="true" patternSyntax="ECMAScript" stopProcessing="false">
<match url="(http://.*);jsessionid=null(.*)" />
<action type="Rewrite" url="{R:1}{R:2}" logRewrittenUrl="true" />
</rule>
</rules>
</rewrite>
</system.webServer>
當令牌是URL,IIS引發錯誤:
404 - File or directory not found.
The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.
沒有令牌(URL手動rewriten),它會是好吧。
怎麼了?也許是規則,也許是另一種ISS配置?
謝謝!
它的工作原理!就是這樣...我將規則更改爲「(。*); jsessionid = null(。*)」,現在模塊正確地重寫URL。問題在於HTTP。 – Alex 2011-02-01 12:36:45