0

About the "off topic" flag : This is not offtopic. As you can see in the accepted answer, it was about Magento config (db + htaccess)

For corporate / political reasons, we are trying to add a fake subfolder to our base urls. I can't configure vhosts/base urls to make it work with this additional string (404 for any page but home page)

Before :
subdomain1.company.com -> store 1
subdomain2.company.com -> store 2

After (help ?) :
subdomain1.company.com/corporate/ -> store 1
subdomain2.company.com/corporate/ -> store 2

I've set each vhost like this :

<VirtualHost *:80>
    DocumentRoot "/path/to/root/directory"
    ServerName subdomain1.company.com
    Alias /corporate "/path/to/root/directory"
    <Directory /path/to/root/directory>
        Order allow,deny
        Allow from all
        AllowOverride All
        RewriteEngine On
        Options +FollowSymlinks
    </Directory>

    SetEnv MAGE_RUN_CODE store1
    SetEnv MAGE_RUN_TYPE store
</VirtualHost>

<VirtualHost *:80>
    DocumentRoot "/path/to/root/directory"
    ServerName subdomain2.company.com
    Alias /corporate "/path/to/root/directory"
    <Directory /path/to/root/directory>
        Order allow,deny
        Allow from all
        AllowOverride All
        RewriteEngine On
        Options +FollowSymlinks
    </Directory>

    SetEnv MAGE_RUN_CODE store2
    SetEnv MAGE_RUN_TYPE store
</VirtualHost>

And my new base urls are subdomain1.company.com/corporate/ and subdomain2.company.com/corporate/
Obviously, I did something wrong. Any help would be highly appreciated....

closed as off-topic by MeenakshiSundaram R, saravanavelu, Rajeev K Tomy, liyakat, 7ochem Sep 22 '15 at 11:43

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions about third-party modules are generally off-topic because the scope of functionality and code are not available. For more information, see this meta post/answer." – MeenakshiSundaram R, saravanavelu, Rajeev K Tomy, liyakat
If this question can be reworded to fit the rules in the help center, please edit the question.

  • Did you change the URL in the Magento settings (in the admin panel -> System -> Configuration -> GENERAL -> Web) and add RewriteBase /corporate/ to .htaccess in Magento main directory? – michael Sep 22 '15 at 10:52
  • base urls are set (domain1.company.com/corporate/ and domain2.company.com/corporate/). I didn't set any RewriteBase in .htaccess. I'll try that – LittleBigDev Sep 22 '15 at 10:54
  • RewriteBase did the trick. @michael feel free to write a real answer and I'll accept it :) – LittleBigDev Sep 22 '15 at 10:58
  • No it's not. We just needed to display /corporate/ in the url, but there is no "corporate" subdirectory in file system – LittleBigDev Sep 22 '15 at 12:47
0

You have to check/do 2 things:

  1. To change the URL in the Magento settings (in the admin panel -> System -> Configuration -> GENERAL -> Web).
  2. To add RewriteBase /corporate/ to the .htaccess in the Magento main directory (after RewriteEngine on).

Not the answer you're looking for? Browse other questions tagged or ask your own question.