Hello,

Im having some trouble using routes with subdomains properly. The
situation is as follows...

The site runs at main.mydomain.co.uk. Almost all of the site is served
from this domain but there is also audio.mydomain.co.uk which serves
some audio. This subdomain runs on a seperate machine with the same
code as the first domain but with some different config options ( to
limit what controllers/actions can be used on that instance )

On the first domain Iv turned on sub_domain support in routes so that
I can pass the sub_domain keyword argument to the few urls that need
to use audio.mydomain.co.uk ( eg url_for('blah', sub_domain="audio")
). This broke all the url generation - routes seems to think the
domain is "co.uk". Hacking around a bit i saw i could set
map.domain_match; setting it to [^\.\/]+?\.[^\.\/]+?\.[^\.\/]+ would
cause routes to generate urls like "mydomain.co.uk" and further
changing it to "[^\.\/]+?\.[^\.\/]+?\.[^\.\/]+?\.[^\.\/]+" results in
urls like "main.mydomain.co.uk".

I thought this fixed the problem but now routes is crashing generating
some urls, specifically, redirect_to calls (without any sub_domain
arguments) seem to fail with GenerationException: url_for could not
generate URL.

Now, firstly, am I going about this the right way? Secondly, any hints
on what the problem might be? Im starting to loose hair over this...
:)

Thanks
Dunk

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to