i've got subdomain support working in routes, but redirect_to did
something i did not expect, and wanted to see if this was a known bug
or a misunderstanding on my part.

here is a short example

map.connect('/{action}', controller='subpage', conditions=
{"sub_domain":['sub']})
map.connect('/{controller}/{action}')

the routing will work as expected:

sub.example.com/login -> controller='subpage', action='login'
www.example.com/subpage/login -> controller='subpage', action='login'

however, when using redirect_to:

redirect_to(controller='subpage', action='login', sub_domain='sub') ->
sub.example.com/login (expected)
redirect_to(controller='subpage', action='login') -> www.example.com/login
(not expected)
redirect_to(controller='subpage', action='login', sub_domain='www') ->
www.example.com/login (not expected)

what i expected was to see was

redirect_to(controller='subpage', action='login') -> 
www.example.com/subpage/login
redirect_to(controller='subpage', action='login', sub_domain='www') ->
www.example.com/subpage/login

i've reworked my URLs for now, but it would be nice to get this
working the way i expected and have the url generation check that the
conditions of the mappers are met, before using one.



--~--~---------~--~----~------------~-------~--~----~
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