Correctly handle URLs if page aliases are disabled (see #6502)