“This webpage has a redirect loop” in Chrome but working fine on FF and IE?

前端 未结 5 2111
说谎
说谎 2020-12-31 08:48

The page http://www.japanforum.com/forum/japanese-language-help/39454-~tara-past-tense-clause.html is accessible using FireFox / IE / Safar / Opera.

However on Chron

5条回答
  •  时光取名叫无心
    2020-12-31 09:26

    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.

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

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

    So you should canonicalize both URIs before comparing them.

提交回复
热议问题