Use prefixes in URL configuration

This cuts down code duplication quite a bit and makes the configuration
more readable. This commit relates to issue #570.