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

multiple websites, htaccess and theme obfuscation
 
jnorton01
Member
 
Total Posts:  49
Joined:  2007-10-22
 

Hello,

I am working on a multi domain Magento install and would like to know if it is possible to obfuscate the skin url and media calls.

Currently everything is set up as a parent->child relationship so that our main website (main.com) supplies content for (other.com) using a standard multi-site set up where the base URL is main.com and the base link URL is other.com.

Everything works as it should but the HTML link references for CSS, JS and Media all point to main.com, thus breaking the illusion of a completely separate, non-affiliated website i.e.

Here is some HTML generated by other.com:
<link rel="stylesheet" type="text/css" href="http://www.main.com/skin/frontend/default/other-theme/css/reset.css" media="all" />

What I would like to see is:
<link rel="stylesheet" type="text/css" href="/skin/frontend/default/other-theme/css/reset.css" media="all" />

Or ideally:
<link rel="stylesheet" type="text/css" href="/css/reset.css" media="all" />

I have been playing with the .htaccess file for other.com but can’t get it to work i.e:
RewriteRule ^skin/(.*) /magento/skin/$1

If anyone has any help or advice then it would be greatly appreciated.

Thanks,

Justin.

 
Magento Community Magento Community
Magento Community
Magento Community
 
jnorton01
Member
 
Total Posts:  49
Joined:  2007-10-22
 

Okay got it working by using symlinks to the appropriate folders, now for some testing!

 
Magento Community Magento Community
Magento Community
Magento Community
 
joyously
Guru
 
Total Posts:  447
Joined:  2008-08-21
 

What does the symlink syntax look like?
You can also change the config xml file that has the definitions of the directories and where they live.

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