Lonnie Knows Everything

Multiple domain names in Joomla 1.0.x

by Lonnie on Jan.14, 2009, under Joomla, Programming

If you’re running Joomla 1.0.x and you’ve tried to get more than one domain name pointing to it, then you’ve no doubt realized that it doesn’t really work out that well. I mean, the site will come up but the moment you click a link you will be sent directly to the original site url.

Well this aims to give you a quick, easy solution!

The first thing you’ll want to do is open up your configuration.php file in your editor of choice.

Look for the variable “$mosConfig_live_site”, this is no doubt configured to your current web site address! and this is what is causing your problem.  We’ll be changing it to this:

$mosConfig_live_site = “http://” . $_SERVER['HTTP_HOST'];

This will pull the site’s URL out of an environment variable on the server! This means that no matter what URL is used to get to your site, Joomla will automatically set $mosConfig_live_site to match.

This solution works in the world of Linux and Apache, if you’re running Joomla in a windows environment and this doesn’t work, I suggest going to your Joomla control panel and looking at System info -> php info … You’re trying to find a variable that contains the website name without http:// in front of it .. once you find something, adjust the code above! if you find one that has http:// in front of it, then you can further adjust the code to suit your needs.

Have fun!

VN:F [1.9.3_1094]
Rating: 0 (from 0 votes)

Incoming search terms:

  • configuration php multiple domain joomla
  • joomla multiple domains
  • multiple domains joomla
  • Joomla multiple domain names
  • joomla several domains
  • multiple domain joomla
  • Multiple Domains in joomla
  • jessica karp
  • change url in Joomla multi domain
  • one joomla website multiple domains
:,

1 Comment for this entry

Leave a Reply



Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...