如何从csv或Excel批量导入IIS 7中的redirect301

有没有办法从Excel或CSV文件导入/更新在IIS 7中的301redirect的100

Excel文件格式目前由两列第一列包括旧的URL和第二列包括新的URL有点像这种格式

https://support.3dcart.com/Knowledgebase/Article/View/297/12/how-do-i-import-my-301-redirects

从web.config文件复制XML格式的redirect,例如:

<configuration> <location path="services.htm"> <system.webServer> <httpRedirect enabled="true" destination="http://domain.com/services" httpResponseStatus="Permanent" /> </system.webServer> </location> <location path="products.htm"> <system.webServer> <httpRedirect enabled="true" destination="http://domain.com/products" httpResponseStatus="Permanent" /> </system.webServer> </location> </configuration> 

将其粘贴到新的记事本文档中。 保存为web.xml。 在Excel中打开它。 Excel应该自动生成一个模式,它应该以类似于你想要的格式出来。 如果需要进一步格式化。 将其另存为CSV。