溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

如何理解Intelligencia.UrlRewriter.dll aspx重寫為html實例

發布時間:2021-10-15 17:33:59 來源:億速云 閱讀:179 作者:柒染 欄目:開發技術

本篇文章為大家展示了如何理解Intelligencia.UrlRewriter.dll aspx重寫為html實例,內容簡明扼要并且容易理解,絕對能使你眼前一亮,通過這篇文章的詳細介紹希望你能有所收獲。

1、http://urlrewriter.net/  下載解壓縮后把Intelligencia.UrlRewriter.dll 文件添加引用到web工程里。

2.web.config配置:

如何理解Intelligencia.UrlRewriter.dll aspx重寫為html實例<configSections>
如何理解Intelligencia.UrlRewriter.dll aspx重寫為html實例  <!--UrlRewriter-->
如何理解Intelligencia.UrlRewriter.dll aspx重寫為html實例  <section name="rewriter" requirePermission="false" type="Intelligencia.UrlRewriter.Configuration.RewriterConfigurationSectionHandler, Intelligencia.UrlRewriter" />
如何理解Intelligencia.UrlRewriter.dll aspx重寫為html實例 </configSections>
如何理解Intelligencia.UrlRewriter.dll aspx重寫為html實例
如何理解Intelligencia.UrlRewriter.dll aspx重寫為html實例<system.web>
如何理解Intelligencia.UrlRewriter.dll aspx重寫為html實例  <!--UrlRewriter-->
如何理解Intelligencia.UrlRewriter.dll aspx重寫為html實例  <httpModules>
如何理解Intelligencia.UrlRewriter.dll aspx重寫為html實例   <add type="Intelligencia.UrlRewriter.RewriterHttpModule,Intelligencia.UrlRewriter" name="UrlRewriter" />
如何理解Intelligencia.UrlRewriter.dll aspx重寫為html實例        </httpModules>
如何理解Intelligencia.UrlRewriter.dll aspx重寫為html實例</system.web>
如何理解Intelligencia.UrlRewriter.dll aspx重寫為html實例 </system.web>
如何理解Intelligencia.UrlRewriter.dll aspx重寫為html實例
如何理解Intelligencia.UrlRewriter.dll aspx重寫為html實例 <!--UrlRewriter-->
如何理解Intelligencia.UrlRewriter.dll aspx重寫為html實例 <rewriter>
如何理解Intelligencia.UrlRewriter.dll aspx重寫為html實例  <rewrite url="~/test_([a-zA-Z]+).html$" to="~/Show.aspx?Code=$1" processing="stop" />
如何理解Intelligencia.UrlRewriter.dll aspx重寫為html實例 </rewriter>
如何理解Intelligencia.UrlRewriter.dll aspx重寫為html實例

其中: <rewrite url="~/test_([a-zA-Z]+).html$" to="~/Show.aspx?Code=$1" processing="stop" />

若果code= abc的話,最終顯示的結果為"虛擬目錄名稱/test_abc.html" 。如果吧.html替換成 .aspx那就是"虛擬目錄名稱/test_abc.aspx"

3.IIS配置:
如果是用"虛擬目錄名稱/test_abc.aspx" 的話,不需要配置IIS. 使用了"虛擬目錄名稱/test_abc.html" 配置IIS的方法如下:
http://urlrewriter.net/index.php/support/installation/windows-server-2003/ 里面的圖9不準確,準確的為:

如何理解Intelligencia.UrlRewriter.dll aspx重寫為html實例

還有第八步中的”untick Verify that file exists.“要看仔細。否則重寫HTML就無效。

4:備注

不要在"應用程序擴展"里“添加" .html的映射,否則正常的html將無法訪問。

上述內容就是如何理解Intelligencia.UrlRewriter.dll aspx重寫為html實例,你們學到知識或技能了嗎?如果還想學到更多技能或者豐富自己的知識儲備,歡迎關注億速云行業資訊頻道。

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

亚洲午夜精品一区二区_中文无码日韩欧免_久久香蕉精品视频_欧美主播一区二区三区美女