How do I programatically 301 redirect in an asp pa

2019-01-20 04:49发布

I'm upgrading some classic asp pages to .net, but not all of them. Rather than go and modify all the links in this backwards system, which pulls some of its links from a cms data store. I would like to take advantage of http and just remove the code our of that file, and perform a programatic 301 so that all the other pages can just be upgraded piecemeal.

1条回答
Emotional °昔
2楼-- · 2019-01-20 05:11
Response.Buffer = true
Response.Status = "301 Redirect"
Response.AddHeader "Location", "redirection-url-goes-here"
Response.End
查看更多
登录 后发表回答