我想重定向/转发我的测试域上的URL。例如,URL是:http://www.mydomaintest.com/feed和我需要将其转发到http://www.mydomaintest.com/feed/stories。
我尝试过在IIS管理器中重写GUI URL,但是重定向不起作用。这种重写在Linux机器上很容易完成,但在IIS上给我带来了很大的麻烦。我也尝试过修改web.config文件,但没有成功。
我尝试过这个方法,重写规则和重定向规则,但是没有什么效果。
以下是我在问这个问题之前所遵循的所有教程:http://www.iis.net/learn/extensions/url-rewrite-module/creating-rewrite-rules-for-the-url-rewrite-module
http://knowledge.freshpromo.ca/seo-tools/301-redirect.php https://stackoverflow.com/questions/10399932/setting-up-redirect-in-web-config-file https://www.iis.net/configreference/system.webserver/httpredirect
谢谢
发布于 2018-10-17 06:36:47
发布于 2016-07-10 02:30:17
创建一个文本文件,其中包含以下代码,并将其保存为webroot中/feed/子文件夹中的default.aspx。
<% Response.Redirect("/feed/stories/"); %>很粗糙,但很管用。有时最简单的方法是最好的。此方法产生302 (临时重定向)。如果您需要做301个永久重定向,请在这里:https://stackoverflow.com/questions/10673303/301-redirect-in-asp-net-4-0
https://serverfault.com/questions/774399
复制相似问题