問:因網站改版,網址不變,但部分收錄的網址需要要301跳轉到新的頁面上,在管理里的301轉向里只能設置把其他域名轉向現在的網址上,不能指定具體的網址。
我用web.config來編寫404規則和301轉向,但不生效,404只有在管理里設了才有效,這個是不是限制了只能在管理里設置,301轉向不能自己通過web.config設置嗎?
答:您好,404請在管理面板中設置,301可以在web.config中編寫,您可以將規則傳上來我們看下,非常感謝您長期對我司的支持!
問:301可以單獨設置啊,那幫忙看一下這個代碼有沒有問題
<?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>
答:您好, 是您自己的規則有問題。
<rule name="Redirect">
<match url="^About.html$" ignoreCase="false" />
<action type="Redirect" redirectType="Permanent" url="http://www.hwalung.com/about/about-7.html" />
</rule>
已經幫您設置了,http://www.hwalung.com/About.html 請訪問這個地址測試,非常感謝您長期對我司的支持!
問:做了一個301跳轉就沒辦法上了 域名是:www.dangao518.com
答:您好,那是因為您自己添加錯了,自己重定向到自己導致循環了。請您再仔細查看301設置說明,現在已經幫您取消了,非常感謝您長期對我司的支持!