ZF:到合作伙伴网站 URL 的路由
如何设置指向合作伙伴网站 URL 的路由?
示例:
<a href="<?php echo $this->url(array(), 'superPartnerRoute'); ?>">Try this ultra fab partner website</a>
这样做的原因;该 URL 相当复杂,并且在我正在开发的网站上使用。
http://slippery.slick.domain.com/ very/long/url/index.asp?view=23457
如果此 URL - 由于某种原因 - 发生变化,我需要更改网站周围的 url。
我可以将其添加到语言文件中,但我想将它们分开。
因此 superPartnerRoute 应该指向 http://slippery.slick.domain.com/very/long/url/index.asp?view=23457
How can i setup a route that points to URL of a partner website?
Example:
<a href="<?php echo $this->url(array(), 'superPartnerRoute'); ?>">Try this ultra fab partner website</a>
Reason for this; the URL is quite complicated and used around the website i'm working on.
http://slippery.slick.domain.com/very/long/url/index.asp?view=23457
If this URL - for some reason - changes i need to change the url around the website.
I could just add it to the language file, but i would like to keep things separated.
So superPartnerRoute should point to http://slippery.slick.domain.com/very/long/url/index.asp?view=23457
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以只使用与路径路由链接在一起的主机名路由。
You could just use a Hostname-Route which you chain together with a path route.
有时我应该在询问之前先尝试一下;-)
只需将其添加到我的routes.ini中
就可以了!
Sometimes i should just try things out before asking ;-)
Just added this to my routes.ini
Works like a charm!