Only path requirements are relevant to optimized urls

The bit of URL generation that is optimized is the generation of
the path so things like :host, :port, etc. are irrelevant.