Arti
Arti

Reputation: 7762

Django multiple domains for page

When user have registered at site, he get a special page on url:

/special/user=<user_id>

These pages doing some tasks. But, at some moment User can add his own domain to this page. With his DNS provider, he create A records that resolve server IP addresses. The same functionality is on a github pages. How can i do that ?

Upvotes: 0

Views: 642

Answers (1)

lehins
lehins

Reputation: 9767

You can configure it using django-hosts, so you wouldn't have to mess with web server itself ad do everything in django. If you will give me some concrete examples, I could help you with configuring this app.

Edit

I am not sure how to tackle that problem, since I can not think of any way you can get any information from arti.com if you don't have access to the actual server arti.com is pointing to. However, I can suggest not using referer=Arti style patterns in urls, use something like that instead: url(r'^invite/(?P<referer>[\w-]+)/', ...) this way it won't be stripped out.

Also with django-hosts you can setup urls with subdomains. Basically you could setup urls to be arti.mysite.com, then in view you would have access to subdomain part, arti in this example, which I believe can solve part of your problem.

Upvotes: 0

Related Questions