18.5.2010 11:19, Michal kirjoitti:
Hi,

I'm currently developing a site that will run on multiple subdomains
(with different content on each), and so I would like to

1) Route based on the "bottom" subomain, e.g. sub1 in sub1.domain.com,
sub2 in sub2.domain.com

2) Not be dependent on the top domain levels (For example to be able
to develop on sub1.domain.localhost)

3) Generate URLs *between* domains.

For 1 and 2, using _SERVER[SEVER_NAME] as routing source, and just
testing the left hand portion of the server name seems to work fine.
However, I realise that I would like to gerate URLs between the
domains. How would I go about doing this?

Thanks,

Michal.
Hi,
you can define the hostname in AgaviWebRouting::gen()
example:
$ro->gen('routename', array(), array('host' => 'mysubdomain.domain.tld'));

take a look at all the available options from here:
http://trac.agavi.org/browser/branches/1.0/src/routing/AgaviWebRouting.class.php#L68

Cheers,
Niklas

_______________________________________________
users mailing list
[email protected]
http://lists.agavi.org/mailman/listinfo/users

Reply via email to