問:因網(wǎng)站改版,網(wǎng)址不變,但部分收錄的網(wǎng)址需要要301跳轉(zhuǎn)到新的頁面上,在管理里的301轉(zhuǎn)向里只能設(shè)置把其他域名轉(zhuǎn)向現(xiàn)在的網(wǎng)址上,不能指定具體的網(wǎng)址。
我用web.config來編寫404規(guī)則和301轉(zhuǎn)向,但不生效,404只有在管理里設(shè)了才有效,這個是不是限制了只能在管理里設(shè)置,301轉(zhuǎn)向不能自己通過web.config設(shè)置嗎?
答:您好,404請在管理面板中設(shè)置,301可以在web.config中編寫,您可以將規(guī)則傳上來我們看下,非常感謝您長期對我司的支持!
問:301可以單獨設(shè)置啊,那幫忙看一下這個代碼有沒有問題
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<defaultDocument>
<files>
<add value="/index.asp" />
</files>
</defaultDocument>
<rewrite>
<rules>
<rule name="Redirect" stopProcessing="true">
<match url="http://www.hwalung.com/About.html" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
<action type="Redirect" url="http://www.hwalung.com/about/about-7.html" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
答:您好, 是您自己的規(guī)則有問題。
<rule name="Redirect">
<match url="^About.html$" ignoreCase="false" />
<action type="Redirect" redirectType="Permanent" url="http://www.hwalung.com/about/about-7.html" />
</rule>
已經(jīng)幫您設(shè)置了,http://www.hwalung.com/About.html 請訪問這個地址測試,非常感謝您長期對我司的支持!
問:做了一個301跳轉(zhuǎn)就沒辦法上了 域名是:www.dangao518.com
答:您好,那是因為您自己添加錯了,自己重定向到自己導(dǎo)致循環(huán)了。請您再仔細查看301設(shè)置說明,現(xiàn)在已經(jīng)幫您取消了,非常感謝您長期對我司的支持!