views:

19

answers:

2

Hi,

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

A: 

Sometimes i should just try things out before asking ;-)

Just added this to my routes.ini

resources.router.routes.superPartnerRoute.type = "Zend_Controller_Router_Route_Static"
resources.router.routes.superPartnerRoute.route = "http://slippery.slick.domain.com/very/long/url/index.asp?view=23457"

Works like a charm!

Phliplip
You are very lucky if that works, usually that should get URL-encoded.
DASPRiD
You can try it out ;-)
Phliplip
+1  A: 

You could just use a Hostname-Route which you chain together with a path route.

DASPRiD
My own answer does the magic just fine thanks :)
Phliplip