且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

"此网页有重定向循环"在Chrome但FF和IE浏览器工作正常?

更新时间:2022-12-09 11:58:49

我看来,你正试图重定向到正确的搜索引擎友好的URL,例如如果我去测试/ 39454-foo.html ,它重定向我测试/ 39454-〜塔拉 - 过去式,clause.html

I appears that you are trying to redirect to the correct SEO-friendly URL, e.g. if I go to test/39454-foo.html, it redirects me to test/39454-~tara-past-tense-clause.html.

您比较请求的URI的预期之一,重定向,如果他们不匹配。

You compare the requested URI to the expected one and redirect if they do not match.

不过,也有写同一个URI的多种方式。有些浏览器可能会发送 urlen codeD,有些可能不是,例如。

However, there are multiple ways of writing the same URI. Some browsers may send ~ urlencoded and some may not, for example.

所以,你应该的。规范化的比较它们两者之前的URI。

So you should canonicalize both URIs before comparing them.