Fix handling of requesting unknown pages via api
Adds support for nested urlnames in pages api.