Match only filenames, not subdirectory+filename. A subdir+filename would
just generate a 404 in most cases, but it could in some cases generate
incorrect redirects that could leave a client stuck in a loop until the
URL got long enough to start failing, which is obviously not very good
behaviour.
Also dont' match an empty filename with just an extension because, well,
that's stupid.