Sunday, October 2, 2011

Re: Part site under a dedicated domain

On 10/02/2011 04:12 PM, Michael Ludvig wrote:
> Hi guys and gals,
>
> I maintain a Django-CMS website running on Django 1.2.5 with a couple of
> pages - one for selling houses, one buying houses, etc. At the moment
> it's all under one domain name (http://patmat.co.nz) with some other
> domains being redirected by Apache to specific pages on the main site,
> for example http://house-buyers.co.nz is redirected to
> http://patmat.co.nz/we-buy-houses/ <http://patmat.co.nz/we-buy-houses/>
>
> Now, I would like to have the "We Buy Houses" part of the main website
> accessible directly at http://house-buyers.co.nz - i.e. when someone
> clicks on a link leading to house-buyers.co.nz I want them to get the We
> Buy Houses page without actually redirecting to patmat.co.nz/we-buy-houses
>
> Similarly the menu created by {% show_menu %} should point to the
> absolute URLs under patmat.co.nz or house-buyers.co.nz respectively. And
> all that, of course, being one Django project with a single database,
> same design templates, same config, same /admin, etc.
>
> Is this at all possible with Django?
>
> Thanks!
>
> Michael
>

Should be possible with multiple virtual host configs in Apache. One for
each domain with all of them having duplicate mod_wsgi or fastcgi
configs. If you want to force certain urls from one domain to the other
use Apache for that. As far as Django is concerned everything is
relative to the top url whatever that may be. Though you can put in
mulitple hostnames in the admin interface which makes things like
flatpages happy.

Happy ponies,
Alex

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment