Hi,

I used routes.py to handle subdomain.
Also I added in google domain * for subdomain.

Here is the routes.py to give you an idea on how I did it.

routes_in = (('.*:https?://([^www][a-z0-9]+)\.wikiyou\.dev:.* /wiki/
(.*)', r'/wikiyou/user/wiki/\1/\2'),
             ('.*:https?://([^www][a-z0-9]+)\.wikiyou\.dev:.* /(.*)',
r'/wikiyou/user/index/\1/\2'))
also routes_out should have a redirect so it uses www for user styles
and other stuff that needs to link back

routes_out = (('/wikiyou/static(?P<any>.*)', 'http://www.wikiyou.dev/
wikiyou/static\g<any>'))

I have lots of things in my routes.py but thats the only thing that
makes the subdomain works.
Also my second question might have been fixed, by simply removing all
A Records that has @ leaving only the URL redirect.
But doesn't work in my google chrome yet, but works on firefox.

On Aug 12, 2:56 pm, Tim Michelsen <[email protected]> wrote:
> > I would like to share my 2nd app using web2py, its atwww.wikiyou.org.
> > It is like wikipedia about us and you can create your own subdomain
> > usernames like having your own username.wikiyou.org.
>
> Hey,
> this looks really cool!
>
> Would you tell how you created this subdomain thing?
>
> Is there a dedicated function for this?
>
> Best,
> Timmie

Reply via email to