I'm using SetEnvIf Host
to redirect users to the correct magento store depending on the domain name.
This works perfect for https://www.domain.co.uk, http://domain.co.uk and http://www.domain.co.uk.
https://domainname.co.uk however bypasses this and redirects to the main store.
here is what i have in the htaccess in the pub folder of the magento 2 system.
SetEnvIf Host ^.*domainname\.co\.uk MAGE_RUN_CODE=uk
SetEnvIf Host ^.*domainname\.co\.uk MAGE_RUN_TYPE=store
Is there something wrong with this code?