狠狠躁夜夜躁人人爽天天不卡软件丨成·人免费午夜无码视频丨国产成人无码18禁午夜福利免费丨欧美一区二区婷婷香蕉狠狠干丨色欲国产精品一区二区

技術(shù)文檔

幫助中心 > 技術(shù)文檔 >

Asp/Aspx程序如何設(shè)置偽靜態(tài)/重定向等功能

2023-12-19 作者:簡米科技 閱讀量:0 所屬分類:技術(shù)文檔

說明: Asp/Aspx程序一般都有默認(rèn)的一套配置文件,所以面板暫不支持自動配置偽靜態(tài)功能,需要自己手動配置。 web.config路徑在網(wǎng)站(站點)根目錄下如何手動配置?分為兩種情況,情況如下:1、當(dāng)Asp程序根目錄不存在web.config文件,或者配置文件內(nèi)容為如下代碼時:可以直接將面板生成的代碼復(fù)制到偽靜態(tài),保存即可

?xml version="1.0" ?configuration location allowOverride="false" inheritInChildApplications="false" path="." system.webServer rewrite rules configSource="web_config\rewrite.config"/rules /rewrite defaultDocument configSource="web_config\default.config"/defaultDocument httpErrors configSource="web_config\httpErrors.config"/httpErrors handlers configSource="web_config\php.config"/handlers /system.webServer /location/configuration

復(fù)制代碼

2、當(dāng)Aspx程序和Asp程序根目錄自帶了web.config文件時: 如原配置為以下格式:

3、(重要)當(dāng)Asp網(wǎng)站不存在原有配置文件時,將網(wǎng)站目錄下的web.config文件內(nèi)容替換成以下代碼即可

?xml version="1.0" ?configuration location path="." allowOverride="false" inheritInChildApplications="false" system.webServer rewrite rules rule name="http_toHttps" stopProcessing="true" match url="(.*)"/ conditions add input="{HTTPS}" pattern="off" ignoreCase="true"/ /conditions action type="Redirect" redirectType="Permanent" url="https://{HTTP_HOST}/{R:1}"/ /rule /rules /rewrite /system.webServer /location/configuration

復(fù)制代碼

手動修改后的代碼: 注意1:如果【圖1】中存在system.webServer/rewrite/rules,則直接加入在下級節(jié)點 注意2:如果【圖1】中不存在system.webServer/rewrite/rules,則需要手動添加,下圖為手動添加【system.webServer/rewrite/rules】

標(biāo)簽:

本文地址:http://www.yganxi.com/help/798.html

簡米科技服務(wù)器支持24小時免費測試


成為簡米科技會員,享受出眾的上云實踐機會和周到的尊貴服務(wù)!