I have the page:
~/forum/forum_faq.html
In my logs I've seen 404 requests to:
~/forum_faq.html
For some reason, so I attempt to fix it with this rule:
<rewrite url="~/forum_faq.html$" to="~/Handlers/PermRedi开发者_C百科rect.ashx?URL=forum/forum_faq.html" processing="stop" />
The perm redirect file just does a 301 redirect to the given location. When this rule isn't there, I can access forum/forum_faq.html just fine. When I add the rule, I get a:
This web page has a redirect loop The web page at http://127.0.0.1/forum/forum_faq.html has resulted in too many redirects. Clearing your cookies for this site or allowing third-party cookies may fix the problem. If not, it is possibly a server configuration issue and not a problem with your computer.
Any ideas what's going on?
Is suspect what is happening is Forum
is an ASP.NET application in IIS. Your ~/forum_faq.html$
is therefore matching the path /forums/forum_faq.html
sending it via your handler which then redirects to /forum/forum_faq.html
in an infinite loop.
精彩评论