How do I point a domain name to a Django url?
Posted
by
username2
on Stack Overflow
See other posts from Stack Overflow
or by username2
Published on 2011-03-14T22:34:05Z
Indexed on
2011/03/15
0:10 UTC
Read the original article
Hit count: 139
I have a subdomain m.example.com
that I want to point to the same location as example.com/mobile
running on an apache2/django1.3 installation.
example.com
is the landing page, and I have the urls.py
configured such that urls that match /^mobile$/
will be served the mobile version of the page. I looked into <VirtualHost>
, but I think it requires a physical location for me to point m.example.com
at and with the django urls there is no physical location except for the root of the project directory.
I am unsure if the configuration change is made on the apache side or the django side.
I've also looked into the mod_rewrite
module for Apache, but I would prefer if I didnt have to redirect m.example.com
to example.com/mobile
© Stack Overflow or respective owner