The Joomla! Forum ™



Forum rules


Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.



Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Mon Aug 13, 2012 8:24 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Fri Aug 10, 2012 6:12 am
Posts: 2
Hi,
I'm trying to manage one site with a store and 2 domain alias that reference to the same place.
the first is www.domain1.co.uk and the second is www.domain2.co.uk

www.domain1.co.uk is the main domain and the cart work wel without ant problems.

but when im runing the site under the second domain (www.domain2.co.uk ) the cart is not working well and i got this error:

XMLHttpRequest cannot load http://www.domain1.co.uk/index.php. Origin http://www.domain2.co.uk is not allowed by Access-Control-Allow-Origin.


1) I change the virtuemart.php.cfg file
Code:
if ($_SERVER['HTTP_HOST'] == "www.domain2.co.uk/") {
define( 'URL', 'http://www.domain2.co.uk/' );
define( 'SECUREURL', 'https://www.domain2.co.uk/' );
} else {
define( 'URL', 'http://www.domain1.co.uk/' );
define( 'SECUREURL', 'https://www.domain1.co.uk/' );
}


2) change htacsses like the sample http://docs.joomla.org/Multiple_Domains_and_Web_Sites_in_a_single_Joomla!_installation
Code:
#The following rule works, but it changes which domain name displays.
RewriteCond %{HTTP_HOST} ^(www\.)?redjohnsoncandy\.com$
RewriteRule (.*) http://www.yellowjohnsoncandy.com/index.php?option=com_content&view=category&layout=blog&id=3&Itemid=12 [R=301,L]




any solution will be very helpful !


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 



Who is online

Users browsing this forum: No registered users and 11 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group