2012-03-26 76 views
0

我想將舊目錄重定向到新目錄(301重定向)。在我的情況,我想這一點:如何將舊目錄重定向到IIS上的新目錄

爲此,我使用IIS上的URL重寫模塊來執行此操作。這是我在我的web.config規則:

<rule name="test" stopProcessing="true"> 
       <match url="xxxx" /> 
       <action type="Redirect" url="yyyy{R:0}" appendQueryString="true" /> 
      </rule> 

它正常工作與http://www.mydomain.com/xxxx/1-my-product-namehttp://www.mydomain.com/xxxx/c/my-category-name但是當我去http://www.mydomain.com/xxxx/它重定向到http://www.mydomain.com/yyyy//有兩個slahes。任何人都知道如何避免這一點?

在此先感謝!

回答

1

我發現,這是我使用的規則:

<rule name="tpepme" stopProcessing="true"> 
     <match url="xxxx(.*)" /> 
     <action type="Redirect" url="yyyy{R:1}" appendQueryString="true" /> 
    </rule> 
相關問題