[web2py] Re: Subdomain based on blog users in routes.py

2011-10-08 Thread GoldenTiger
I love playing with subdomains and multiple domains, The * as dns entry is ok (be carefull with dns entries order), you can do it in routes.py, but I see more apropiate on models or controllers If you don't success, contact me and sure I'll solve it On Oct 5, 5:10 pm, Farsheed Ashouri wrote: > ya

[web2py] Re: Subdomain based on blog users in routes.py

2011-10-05 Thread Farsheed Ashouri
ya, It works, but it's not was i expected. for example my own blog * rodmena.ourway.ir* now redirects to it's correct path, but i wanted to stay at sub domain level while surfing. my code is simple: # Blogs subdomain redirection === host_parts = request.env.http

[web2py] Re: Subdomain based on blog users in routes.py

2011-10-03 Thread pbreit
Does doing a simple redirect not work for you? if request.vars.u: redirect('%s.mysite.com' % request.vars.u)

[web2py] Re: Subdomain based on blog users in routes.py

2011-10-03 Thread Farsheed Ashouri
Yes Anthony, I've read it 50 times! but i cant figure out this one. your code doesn't work. I test it few times on my local and main server. :( I am giving up!

[web2py] Re: Subdomain based on blog users in routes.py

2011-10-02 Thread Anthony
Have you read through http://web2py.com/book/default/chapter/04#Pattern-Based-System? Not sure if this will work, but maybe something like: routes_in = (('http://$sub\.mysite\.com', '/myapp/pages/blog?user=$sub')) On Sunday, October 2, 2011 8:14:32 PM UTC-4, Farsheed Ashouri wrote: > > So, Any

[web2py] Re: Subdomain based on blog users in routes.py

2011-10-02 Thread Farsheed Ashouri
So, Any reliable setting? Any alternative ways? probably with Apache settings?

[web2py] Re: Subdomain based on blog users in routes.py

2011-10-01 Thread KMax
Have you looked in apache2/nginx redirect engine? On 2 окт, 05:23, Jonathan Lundell wrote: > On Oct 1, 2011, at 3:13 PM, Jonathan Lundell wrote: > > > On Oct 1, 2011, at 2:13 PM, Farsheed Ashouri wrote: > > >> I think i have no problem with DNS. cause i put a * value in subdomain > >> setting of

[web2py] Re: Subdomain based on blog users in routes.py

2011-10-01 Thread Farsheed Ashouri
Any Idea? Please.