問(wèn):服務(wù)器web.config 文件配置301轉(zhuǎn)向后無(wú)法進(jìn)網(wǎng)站后臺(tái)。
服務(wù)器里面網(wǎng)站管理助手里有一個(gè)網(wǎng)站:“富瑩電商” 網(wǎng)址是 dsr123.com,后臺(tái)地址是dsr123.com/ 目前前臺(tái)后臺(tái)都是能正常打開(kāi)的, 這個(gè)站的根目錄本身就有WEB.CONFIG 文件,文件內(nèi)容如下:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="OrgPage" stopProcessing="true">
<match url="^(.*)$" />
<conditions logicalGrouping="MatchAll">
<add input="{HTTP_HOST}" pattern="^(.*)$" />
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="index.php/{R:1}" />
</rule>
<rule name="disableDownloadHtml">
<match url="^App/Tpl/.*.html$" ignoreCase="true" />
<action type="CustomResponse" url="/" statusCode="403" statusReason="Forbidden" statusDescription="Forbidden" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
本人想在這段代碼里增加301重定向的代碼,按照西數(shù)官方的教程稍微的修改的時(shí)候,就發(fā)覺(jué)進(jìn)不去后臺(tái),進(jìn)入后臺(tái)的時(shí)候就會(huì)亂碼,感覺(jué)是環(huán)境出錯(cuò)一樣,麻煩給看一下,或者你們也測(cè)試一下。
修改后是下面這樣:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="OrgPage" stopProcessing="true">
<match url="^(.*)$" />
<conditions logicalGrouping="MatchAll">
<add input="{HTTP_HOST}" pattern="^dsr123.com$" />
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="http://www.dsr123.com/{R:1}" />
</rule>
<rule name="disableDownloadHtml">
<match url="^App/Tpl/.*.html$" ignoreCase="true" />
<action type="CustomResponse" url="/" statusCode="403" statusReason="Forbidden" statusDescription="Forbidden" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
,服務(wù)器web.config 文件配置301轉(zhuǎn)向后無(wú)法進(jìn)網(wǎng)站后臺(tái)
問(wèn):mstsc —127.0.0.1: — @qq.com 有勞了
答:您好:
已經(jīng)添加301,非常感謝您長(zhǎng)期對(duì)我司的支持!