[ticket/11997] Correctly redirect to front controllers

We currently do a lot of checks in order to prevent users from getting to
a 404 page. However, this logic relies on checking if a file or folder exists.
Due to the front controllers and the URL rewriting in 3.1, it is no longer
possible to rely on existing files for redirecting. This patch will take
care of properly redirecting users to front controller files. An incorrect
link will cause users to get a 404 error though.

Ticket: http://tracker.phpbb.com/browse/PHPBB3-11997

PHPBB3-11997