Tweak the subdomain stuff - doesn't need to be in the location = / to work. Added support for the json and markdown URLs.