Code: Select all
shoes.mall.com
Shirts.mall.com
1 Login to cPanel for your domain, and click on the Subdomains icon.
For the Subdomain, we'll enter shoes. cPanel will automatically fill in the next field, so remove public_html/ from the Document Root field, leaving us with just shoes. This step isn't required, but for organizational purposes, it makes more sense.
2 Click the Create button.
3 Login to your site via SSH, and go to the directory that we previously set in the Document Root field above when creating our subdomain. In our case, we would do the following:
Code: Select all
cd shoes/
Code: Select all
cp ../public_html/index.php ../public_html/.htaccess .
6 Open up the index.php file that we just copied over and replace the following line of code:
Code: Select all
$mageFilename = 'app/Mage.php';
Code: Select all
$mageFilename = '../public_html/app/Mage.php';
Code: Select all
Mage::run($mageRunCode, $mageRunType);
Code: Select all
$mageRunCode = 'shoes';
$mageRunType = 'website';
Code: Select all
ln -s ../public_html/app ./app
ln -s ../public_html/errors ./errors
ln -s ../public_html/includes ./includes
ln -s ../public_html/js ./js
ln -s ../public_html/lib ./lib
ln -s ../public_html/media ./media
ln -s ../public_html/skin ./skin
ln -s ../public_html/var ./var
https://robot.lk/viewtopic.php?f=74&t=2813