We help IT Professionals succeed at work.
Get Started

htaccess 302 redirect - seamless hidden url

Mark Gilbert
Mark Gilbert asked
Last Modified: 2013-12-12

I have a base magento install on abc.com and have setup multi-sites and stores for different domain names.

If I setup xyz.com domain and set it as an alias to abc.com the site works as expected. Magento recognizes xyz.com in the address line and treats the site as if it were xyz.com. However, I cannot bind an SSL cert to this domain as it doesn't exist as an entity but as a pointer.
Therefore I'm under the understanding that for xyz.com to be served from abc.com and have xyz.com SSL cert I have to set it up as a site and use an htaccess file. I'm pretty familiar with htaccess files and have had many other setups work successfully simply using a 301 redirect. This though changes the address in the address bar. This is bad as magento will not know which site to serve up, so I figured a 302 redirect would work well.

I've done some extensive reading and from what I gather an external redirect such as xyz.com to abc.com would be would be defaulted to a 301 redirect.

How can I redirect to abc.com as xyz.com? I have full access to all the sites, with the only exception being that I cannot edit httpd.conf, hosts.conf or install new modules on the apache install.

FYI, I'm running the sites from RackSpace Cloud Sites offerings with a dedicated RackSpace Cloud Server for the database.

Please could some help.
Watch Question
This problem has been solved!
Unlock 1 Answer and 5 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE