Functional base url

fixes http://jira.grails.org/browse/GRAILS-10661