1

Magento EE v1.14.x, CentOS 7

We already have a website/store/view shop which works fine, listening on 'shop.mydomain.co.uk'.

We just tried adding a new website/store/view by:

  • Registering 'shop2.mydomain.co.uk' with DNS.
  • Configuring Apache to serve virtualhost 'shop2.mydomain.co.uk':

    <VirtualHost *:80>
        DocumentRoot /ssddata/www/shop.mydomain.co.uk
        ServerName shop2.mydomain.co.uk
        ErrorLog logs/shop2.mydomain.co.uk/error_log
        CustomLog logs/shop2.mydomain.co.uk/access_log common
    
        <Directory "/ssddata/www/shop.mydomain.co.uk">
            Require ip 10.11.0.0/16
            Options Indexes FollowSymLinks MultiViews
            AllowOverride All
            Require all granted
            Order allow,deny
            Allow from all
        </Directory>
    
        SetEnv MAGE_RUN_CODE "shop2_site_code"
        SetEnv MAGE_RUN_TYPE "website"
    
    </VirtualHost>
    
  • Creating the appropriate new website/store/view in Magento Admin.

  • Configuring Magento web management for the new site to use a new custom CMS homepage, new custom 'CMS No Route Page' and set the Base URL to use "http://shop2.mydomain.co.uk/".

Everything seems fine, and we have read at least a dozen online guides, however, when we browse to our new site ('shop2.mydomain.co.uk'), the browser responds with

shop2.mydomain.co.uk redirected you too many times.

I know there are many many similar questions everywhere on this issue, but none fit our circumstances (and none of their solutions work for us). For instance, the rest of our Magento instance is fine. The Admin area is still online and our primary shop is still working fine.

What I have done/checked:

  • [magento root]/.htaccess is fine.
  • All file permissions are fine.
  • I have tried cleaning out all browser cookies, browsing "incognito" and even new browsers.
  • Cleared out [magento root]/var/cache.
  • Cleared out [magento root]/var/session.
  • Flushed all Magento caches.
  • Checked Apache and Magento logs.

I have found that if I remove the two SetEnv commands from the Apache virtualhost then I can browse to the 'shop2.mydomain.co.uk' URL but Magento serves the primary site/shop. So, it must be something to do with Magento trying to run the specified website code (via MAGE_RUN_CODE) which causes a loop. But I don't understand why or how.

We are running out of ideas as to why this new site is endlessly redirecting.

Does anyone have any suggestions to get this new site working please?

UPDATE 1 Something I should add is that when the browser reports "redirected you too many times", the address bar changes to: "http://shop2.mydomain.co.uk/no-route". So Magento must be responding somehow, as it tries to redirect it to it's default "404 Page not found" page (URL-key: no-route). Interestingly though, the URL-key in our configuration for shop2.mydomain.co.uk's "404 page not found" page is actually "shop2-no-route", not "no-route". No idea if this is significant or helpful though! :)

4
  • 1
    is it correct that your DocumentRoot and Directory have different paths? Jun 9, 2016 at 17:27
  • What are the Magento base URLs for your second shop?
    – scrowler
    Jun 9, 2016 at 18:26
  • @Robbie Averill, base URLs in Magento config for 'shop2.mydomain.co.uk' are: Base URL: shop2.mydomain.co.uk (unsecure and secure). 'Use Secure URLs in Frontend' is set to 'no'.
    – hgp-it
    Jun 9, 2016 at 19:44
  • @simonthesorcerer, typo on my behalf when typing up the question. Will fix :)
    – hgp-it
    Jun 9, 2016 at 19:53

1 Answer 1

1

I think I just nailed it!

  • System > Configuration > [shop2.mydomain.co.uk Site Scope] > General

There's an option under section 'Website Restrictions' for 'Landing Page'. It was pointing to the default 404 CMS page (which explains my 'UPDATE1'). I changed that to point to our 'shop2.mydomain.co.uk' custom home page and we have something. There are some CSS issues but I think we can take it from here.

Thank you for all who have posted and read my query.

Cheers.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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