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

2011-10-05 Thread Farsheed Ashouri
ya, I am trying to solve it. Let's see what'll come up with this night! :)) Thank you Jonathan! On Wed, Oct 5, 2011 at 6:38 PM, Jonathan Lundell wrote: > On Oct 5, 2011, at 8:03 AM, Farsheed Ashouri wrote: > > Well it worked!! but with many problems in Ajax loading! Thank you, but any > improvem

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

2011-10-05 Thread Jonathan Lundell
On Oct 5, 2011, at 8:03 AM, Farsheed Ashouri wrote: > Well it worked!! but with many problems in Ajax loading! Thank you, but any > improvements?? You might want to look at request.controller (and .function and .extension) to detect Ajax requests and do something else with them (depending on wh

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

2011-10-05 Thread Farsheed Ashouri
Well it worked!! but with many problems in Ajax loading! Thank you, but any improvements??

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

2011-10-05 Thread Jonathan Lundell
On Oct 5, 2011, at 7:36 AM, Farsheed Ashouri wrote: > 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 =

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

2011-10-02 Thread Jonathan Lundell
On Oct 2, 2011, at 7:23 AM, Anthony wrote: > I'm not sure about reading URLs (incoming or outgoing), but for re-writing > them, there is an example in > http://web2py.com/book/default/chapter/04#Pattern-Based-System showing a > re-write involving the query string: > > '/test/default/index?vars

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

2011-10-02 Thread Anthony
I'm not sure about reading URLs (incoming or outgoing), but for re-writing them, there is an example in http://web2py.com/book/default/chapter/04#Pattern-Based-System showing a re-write involving the query string: '/test/default/index?vars=\g' Presumably if could be a match of the subdomain,

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

2011-10-01 Thread Jonathan Lundell
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 DNS and now i have access to any sub-domain i want. >> So you say there is no way to solve this in r

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

2011-10-01 Thread Jonathan Lundell
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 DNS and now i have access to any sub-domain i want. > So you say there is no way to solve this in routes.py? With the regex mode, perhaps.

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

2011-10-01 Thread pbreit
Until you figure out how to do it in routes.py, how about: if request.vars.u: redirect('%s.mysite.com' % request.vars.u)

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

2011-10-01 Thread Farsheed Ashouri
I think i have no problem with DNS. cause i put a * value in subdomain setting of DNS and now i have access to any sub-domain i want. So you say there is no way to solve this in routes.py?

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

2011-10-01 Thread Jonathan Lundell
On Sep 28, 2011, at 8:13 PM, Farsheed Ashouri wrote: > Hi everyone, I have a blog system and I need a pages like: > mysite.com/myappName/pages/blog?u=user1 > map to something like this: > user1.mysite.com > > I've read many posts here, the book and other resources i idea how this > regexpr thing

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

2011-09-28 Thread Farsheed Ashouri
Hi everyone, I have a blog system and I need a pages like: mysite.com/myappName/pages/blog?u=user1 map to something like this: user1.mysite.com I've read many posts here, the book and other resources i idea how this regexpr thing works. Could you please show me *exactly* how this example works i