我工作在Windows Server2003的下列要求:如何在IIS6中配置url重寫來考慮以「/」結尾的URL,如同頁面一樣?
IIS6
.NET運行庫2.0
ASP.NET C#
我有一些網頁這樣的:
fr.mywebsite.eu/productA/sub_product1.html fr.mywebsite.eu/productA/sub_product2.html fr.mywebsite.eu/productB/sub_product14.html fr.mywebsite.eu/productC/sub_product26.html
目錄productA
,productB
,productC
確實不存在。
在我global asax
,我得到的URL請求的,我做這樣的事情:
HttpContext.Current.RewritePath(
"product.aspx?p=" + codeProduct + "&sp=" + codeSubProduct);
現在一切工作。
但我想對頁面進行以下列表中的所有子產品:
http://fr.mywebsite.eu/productB/
的問題是,IIS認爲productB
是一個目錄,我得到一個404
錯誤。
是否有任何指令使IIS不檢查是否目錄存在類似於ISAPI擴展的方式,但對於目錄?
我剛試過這個解決方案,它不起作用。 – 2010-10-06 14:53:58