I have found this hack and i want to know if i can use it some way with the joomsef.
The opensef could do something like that without any code.
Could you please help so we can have multiple parked domains on one site
Code:
Multiple Domain names to the Same Shop!
« on: June 30, 2005, 18:32:23 pm »
Hi!
So, you have 3 or 4 domain names and you want to post them to the same shop... and you want the customer to see the URL that they visited, not some redirect.
Php gives you a few tools that will allow this.
First, in your mambo configuration (configuration.php) make this change:
Code [Toggle White Space Wrap]
$mosConfig_live_site = 'http://' . $_SERVER['HTTP_HOST'];
$mosConfig_sitename = $_SERVER['HTTP_HOST'] .' -- Your source for all you brew!';
Note that I've also appeneded (concatenated) the site slogan there in the sitename variable. This effects the 'title' seen by the customer for the web page.
If you are a better php hack than I, you could also do something with these variables to have a slightly different logo appear, etc., in the site templates...
Now, to configure PHPSHOP.
First, through the administration screen, make sure that all the options are set the way you want them. If you edit the file as I am about to describe, and then edit using the phpshop admin, you'll break it! (I've discussed with Soeren, and he might patch to make this a one click option).
Ok. Got your options set? Great.
Now, you have to edit the phpshop configuration file manually.
In the administrator/components/com_phpshop directory, find the file \"phpshop.cfg.php\".
Open this with a text editor (wordpad, etc).
Find these lines:
Quote
define('URL', '
www.brewvan.com/');
define('ORDER_MAIL_HTML', '1');
define('SECUREURL', '
www.brewvan.com/');
define('COMPONENTURL', '
www.brewvan.com/administrator/components/com_phpshop/');
define('IMAGEURL', '
www.brewvan.com/components/com_phpshop/shop_image/');
We're going to change what's in red...
Code [Toggle White Space Wrap]
define('URL', 'http://' . $_SERVER['HTTP_HOST']. '/');
define('ORDER_MAIL_HTML', '0');
define('SECUREURL', 'http://' . $_SERVER['HTTP_HOST'] . '/');
define('COMPONENTURL', 'http://' . $_SERVER['HTTP_HOST'] . /administrator/components/com_phpshop/');
define('IMAGEURL', 'http://' . $_SERVER['HTTP_HOST'] . '/components/com_phpshop/shop_image/');
It's that simple.
Now, you'll find that whatever of your parked domains the customer uses to get to the site, they'll see that URL.
One other thing - all your URLs within the site (i.e. links that you've put in yourself) should be relative. For example, instead of a link to a category being \"
www.brewvan.com/component/option,com_php...temid,47/\"
it should be \"/component/option,com_phpshop/page,shop.browse/category_id,1/option,com_phpshop/Itemid,47/\"