frostschutz / MyBB-Google-SEO

Search Engine Optimization plugin for MyBB.
https://community.mybb.com/thread-202483.html
GNU General Public License v3.0
30 stars 25 forks source link

redirect loop with nginx, highlights #32

Closed frostschutz closed 12 years ago

frostschutz commented 12 years ago

MyBB's issue with wrong ?& in the URL, combined with nginx, combined with a highlight=word+word, leads to a redirect loop.

MyBB produces an URL like http://site&highlight=word+word without ? (workaround: enable MyBB SEF URL setting if possible)

nginx redirects it to http://site?highlight=word%2Bword (Apache does word+word or word%20word). [Is it nginx or apache misbehaving here?]

Google SEO Redirect sees word%2Bword which should be treated as word+word however it's treated as 'word word'. So Redirect is decoding the parameter twice.

The final redirect result however is word+word anyway so it redirects to word%2Bword (word+word) and doesn't notice that's already the correct location because it thinks it should be word+word (word word).

Redirect behaviour obiously needs to be fixed. Not sure what we can do about nginx behaviour.

frostschutz commented 12 years ago

Hopefully fixed in 1.6.3