Fixes #1169: anchor doesn't work when enablePrettyUrl is false.