fixed issue with interaction with url_for... domain/app/local should resolve to localdomain/app