婷婷综合国产,91蜜桃婷婷狠狠久久综合9色 ,九九九九九精品,国产综合av

主頁(yè) > 知識(shí)庫(kù) > aspx文件格式使用URLRewriter實(shí)現(xiàn)靜態(tài)化變成html

aspx文件格式使用URLRewriter實(shí)現(xiàn)靜態(tài)化變成html

熱門標(biāo)簽:百度地圖標(biāo)注點(diǎn)擊事件 山東防封電銷卡辦理套餐 怎樣在地圖標(biāo)注消火栓圖形 內(nèi)蒙古智能電銷機(jī)器人哪家強(qiáng) 泰州手機(jī)外呼系統(tǒng)軟件 地圖標(biāo)注位置多的錢 濟(jì)源人工智能電話機(jī)器人價(jià)格 杭州智能電話機(jī)器人 廈門四川外呼系統(tǒng)
使用asp.net 開(kāi)發(fā)的網(wǎng)頁(yè)程序,使用URLRewriter.dll 實(shí)現(xiàn)靜態(tài)化。
A. 下載URLRewriter.rar,解壓后放在/bin/目錄下
B. 將URLRewriter.rar 加入工程引用。
C. 配置IIS 站點(diǎn),將擴(kuò)展名為html 指向處理程序aspnet_isapi.dll。
IIS 站點(diǎn)->屬性->主目錄->配置->添加
可執(zhí)行文件和aspx 處理相同,都是 c:\windows\microsoft.net\framework\v2.0.50727\aspnet_isapi.dll
特別注意,一定不要選擇檢查文件是否存在。
D. 在web.config 中添加配置內(nèi)容,壓縮包里有。
復(fù)制代碼 代碼如下:

configSections>
section name="RewriterConfig"
type="URLRewriter.Config.RewriterConfigSerializerSectionHandler, URLRewriter" />
/configSections>
!-- 實(shí)際重定向-->
RewriterConfig>
Rules>
RewriterRule>
LookFor>~/(\d*).html/LookFor>
SendTo>~/user/default.aspx?link=$1/SendTo>
/RewriterRule>
/Rules>
/RewriterConfig>
system.web>
!--
需要在IIS 里面增加html 引用,改成aspx 的引用
-->
httpHandlers>
add verb="*" path="*.aspx"
type="URLRewriter.RewriterFactoryHandler, URLRewriter" />
add verb="*" path="*.html"
type="URLRewriter.RewriterFactoryHandler, URLRewriter" />
/httpHandlers>

E. 在地址欄輸入[url]http://localhost/1.html[/url] 指向[url]http://localhost/user/default.aspx?link=1[/url]

基于Apache HTTP Server 靜態(tài)化Apache Web Server 的配置(conf/httpd.conf )
A. 在httpd.conf 文件中查找LoadModule rewrite_module modules/mod_rewrite.so
通常該行被注釋,去掉“#”。如果沒(méi)有就增加該行。
B. 加入代碼:
復(fù)制代碼 代碼如下:

IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^/([0-9]+).html$ /user.php?user=$1
/IfModule>

C. 如果網(wǎng)站使用通過(guò)虛擬主機(jī)來(lái)定義,請(qǐng)務(wù)必加到虛擬主機(jī)配置文件.htccess 中去,否則可能
無(wú)法使用。
D. 重啟Apache,重新載入配置。
E. 在地址欄輸入[url]http://localhost/1.html[/url] ,實(shí)際指向[url]http://localhost/user.php?user=1[/url]
您可能感興趣的文章:
  • 比較詳細(xì)的Asp偽靜態(tài)化方法及Asp靜態(tài)化探討
  • 不用mod_rewrite直接用php實(shí)現(xiàn)偽靜態(tài)化頁(yè)面代碼
  • 網(wǎng)頁(yè)的HTML靜態(tài)化_網(wǎng)站優(yōu)化之談
  • 通用大型網(wǎng)站頁(yè)面靜態(tài)化解決方案
  • php 靜態(tài)化實(shí)現(xiàn)代碼
  • asp 網(wǎng)站靜態(tài)化函數(shù)代碼html
  • nginx 偽靜態(tài)化rewrite規(guī)則
  • ASP頁(yè)面靜態(tài)化批量生成代碼分享(多種方法)
  • php靜態(tài)化頁(yè)面 htaccess寫法詳解(htaccess怎么寫?)
  • smarty 緩存控制前的頁(yè)面靜態(tài)化原理
  • php頁(yè)碼形式分頁(yè)函數(shù)支持靜態(tài)化地址及ajax分頁(yè)
  • 使用ob系列函數(shù)實(shí)現(xiàn)PHP網(wǎng)站頁(yè)面靜態(tài)化
  • 分享常見(jiàn)的幾種頁(yè)面靜態(tài)化的方法
  • 如何對(duì)ASP.NET網(wǎng)站實(shí)現(xiàn)靜態(tài)化

標(biāo)簽:新鄉(xiāng) 喀什 臺(tái)州 朔州 洛陽(yáng) 周口 朝陽(yáng) 百色

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《aspx文件格式使用URLRewriter實(shí)現(xiàn)靜態(tài)化變成html》,本文關(guān)鍵詞  aspx,文件,格式,使用,URLRewriter,;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問(wèn)題,煩請(qǐng)?zhí)峁┫嚓P(guān)信息告之我們,我們將及時(shí)溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無(wú)關(guān)。
  • 相關(guān)文章
  • 下面列出與本文章《aspx文件格式使用URLRewriter實(shí)現(xiàn)靜態(tài)化變成html》相關(guān)的同類信息!
  • 本頁(yè)收集關(guān)于aspx文件格式使用URLRewriter實(shí)現(xiàn)靜態(tài)化變成html的相關(guān)信息資訊供網(wǎng)民參考!
  • 推薦文章
    主站蜘蛛池模板: 河源市| 宁国市| 廉江市| 虹口区| 老河口市| 建德市| 渝中区| 青岛市| 蓬莱市| 康乐县| 宕昌县| 五台县| 金溪县| 镇坪县| 鸡东县| 余姚市| 黄梅县| 惠来县| 八宿县| 长垣县| 丹阳市| 新巴尔虎左旗| 通江县| 长葛市| 遂昌县| 靖宇县| 青川县| 黄山市| 武安市| 壶关县| 普格县| 全南县| 名山县| 紫金县| 抚松县| 思茅市| 沾益县| 九江市| 手游| 定远县| 建湖县|