Is there any more or less standard way to specify a route that would create URL's with explicitly specified scheme?
I've tried the solution specified here but it's not excellent for me for several reasons:
- It doesn't support base url request property. Actually rewrite router ignores it when URL scheme is specified explicitly.
- It's needed to specify separate static route for each scheme-dependent URL (it's not possible to chain module route with hostname route because of base url is ignored).
- It's needed to determine HTTP_HOST manually upon router initialization in bootstrap as long as request object is not present within FrontController yet.
Use a combination of the ServerUrl and Url view helpers to construct your URLs, eg (view context)
You can write your own custom
View
helper for composing anURL
. Take a look at the http://www.evilprofessor.co.uk/239-creating-url-in-zend-custom-view-helper/