Fix issue with friendly redirects

Internal thread: http://community.mybb.com/thread-141783.html