Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Second Domain: Working, but no CSS, JS or MEDIA
 
moleygunn
Member
 
Total Posts:  73
Joined:  2008-11-25
 

I setup a second domain by copying .htaccess and index.php into a subdirectory. It works fine, except the stylesheets, javascript and media stuff isn’t appearing. Anyone got any ideas? When I try the URL of a stylesheet, for example, I get a 404.

Thanks for any help

 
Magento Community Magento Community
Magento Community
Magento Community
 
moleygunn
Member
 
Total Posts:  73
Joined:  2008-11-25
 

Also worth mentioning that none of my CMS pages are working, and I’m getting an error for the 404 page too. Looks related to the problem above because it’s pointing to the cms directory. I know it’s something simple like changing the new domains root directory. Anyone seen this before?

Thanks!

 
Magento Community Magento Community
Magento Community
Magento Community
 
mikeinspain
Sr. Member
 
Avatar
Total Posts:  108
Joined:  2007-10-08
Alicante, Spain
 

I too have been having issues with regards to a “Multi-Store” setup…

One thing to check is in the Admin Panel: System > Configuration > Web

http://img.skitch.com/20081216-bcf1p5sxh2c34a363322ccggpt.preview.jpgClick for full size - Uploaded with plasq‘s Skitch

Select the appropriate store on the left hand side, making sure that the base url’s for;
Skin
Links
Media
Javascript

All point to the original stylesheet etc… That is if you are using the same theme/theme design..

Hope that helps

 
Magento Community Magento Community
Magento Community
Magento Community
 
moleygunn
Member
 
Total Posts:  73
Joined:  2008-11-25
 

Yeah, I had them set correctly. I currently have them set to http://www.originaldomain.com/skin and so on. With the base URL set to http://www.newdomain.com. It’s the only way Magento picks up the right stylesheets. Obviously this isn’t ideal. Does any know where the setting is that points the new domain to the right directories?

 
Magento Community Magento Community
Magento Community
Magento Community
 
moleygunn
Member
 
Total Posts:  73
Joined:  2008-11-25
 

In case anyone’s stuck with this, I set up symbolic links using a cron task in CPanel. They’re pretty much like shortcuts in Windows. I just pointed the 3 directories to the root of my domain.

Can’t find the article that showed me how to do it, though!

 
Magento Community Magento Community
Magento Community
Magento Community
 
Crucial
Enthusiast
 
Avatar
Total Posts:  770
Joined:  2007-11-07
Phoenix, AZ
 

Symbolic links is the easiest way to do this. I just finished a very long, in-depth article on how to setup multiple stores for Magento, and it’s written specifically for cPanel (though it applies to other control panels):

http://www.crucialwebhost.com/blog/how-to-setup-multiple-magento-stores/

Instructions for how to create a symbolic link are listed in there.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top