It would be nice to share the answer with the community Rajnesh :)
I think that the problem was that the store code wasn't correctly set when magento was initiated.
There are a few ways to configure this:
- htaccess (or nginx) recommended
- edit index.php (this is a core hack)
- separate directories for each domain and symlink to the magento app (very dirty)
Because I think the first is the one and only good solution I will give an example for that.
- Add a new store. System > Manage stores
- Open you're .htaccess file and place and edit this code
SetEnvIf Host www.youreurl.com MAGE_RUN_CODE=YOURECODE
SetEnvIf Host www.youreurl.com MAGE_RUN_TYPE=website
SetEnvIf Host www.youreurl2.com MAGE_RUN_CODE=YOURECODE2
SetEnvIf Host www.youreurl2.com MAGE_RUN_TYPE=website
If this doenst work, you problably run nginx instead of apache. With nginx you have to set the store code with the fastcgi_param like this
fastcgi_param MAGE_RUN_CODE YOURECODE;
fastcgi_param MAGE_RUN_TYPE website;
The 'YOURECODE' is the code you entered when you created a new website.
You can enter the urls if you go to System > Configuration > Web > Unsecure & Secure. Example: