Search code examples
phpjoomlasubscriptionbranding

Custom domain with Joomla


Is there any nice component for Joomla 1.0.x allowing to serve custom domains? What I am trying to archieve is to sell subscription to my service and to offer custom branding including custom urls like yourcompany.myservice.com and even example.myservice.com. Any pointers? I am selling subscriptions themselves already for a long time, so the question is specifically on the domain part - how to manage apache vhosts/dns settings/whatever dynamically.


Solution

  • Since Joomla has moved on with version 1.5 it would be hard to find what you want for 1.0. I'd recommend switching to 1.5.

    You can easily get multi-domain ability yourself. First you have to make sure all sub domains resolve to the same set of IPs. (*.yoursite.com)

    For 1.0 you could probably get away with just plugins, but you might need to edit the core. If you use a plugin, say a system plugin, in the plugin you can check for the HOST header.

    eg:

    $host = $_SERVER['HTTP_HOST'];
    

    From this, you base your specific settings/parameters etc. You can also do the check from within components, modules etc.

    An example would be loading different template. If the host is a sub domain, then load a custom template for that sub domain.

    This is actually a lot easier to do with 1.5 as you can control what loads from plugins.