Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/276.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/32.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 简单ASP重写规则的困难_C#_Asp.net_Redirect_Url Rewriting - Fatal编程技术网

C# 简单ASP重写规则的困难

C# 简单ASP重写规则的困难,c#,asp.net,redirect,url-rewriting,C#,Asp.net,Redirect,Url Rewriting,我有一页: ~/forum/forum_faq.html 在我的日志中,我看到404个请求: ~/forum_faq.html 出于某种原因,因此我尝试使用以下规则修复它: <rewrite url="~/forum_faq.html$" to="~/Handlers/PermRedirect.ashx?URL=forum/forum_faq.html" processing="stop" /> perm重定向文件只是将301重定向到给定位置。如果没有这个规则,我可以访问f

我有一页:

~/forum/forum_faq.html
在我的日志中,我看到404个请求:

~/forum_faq.html
出于某种原因,因此我尝试使用以下规则修复它:

<rewrite url="~/forum_faq.html$" to="~/Handlers/PermRedirect.ashx?URL=forum/forum_faq.html" processing="stop" />

perm重定向文件只是将301重定向到给定位置。如果没有这个规则,我可以访问forum/forum\u faq.html。当我添加规则时,我得到:

此网页在以下位置有一个重定向循环 导致了太多 重定向。正在清除此站点的Cookie或允许第三方 cookies可以解决这个问题。如果不是,则可能是服务器 配置问题,而不是计算机的问题


知道发生了什么吗?

怀疑正在发生的事情是
论坛
是IIS中的ASP.NET应用程序。因此,您的
~/forum\u faq.html$
与路径
/forums/forum\u faq.html
相匹配,该路径通过处理程序发送,然后在无限循环中重定向到
/forum/forum\u faq.html

如果url为“~/forum\u faq.html$”,则处理程序编码重定向到哪里?论坛是ASP.Net应用程序吗?