0

I have three wordpress websites hosted on Apache server in three different subfolders, like www.mydomain.com/sub1;www.mydomain.com/sub2;www.mydomain.com/sub3

Now, I have three new domain names (www.sub1.com; www.sub2.com; www.sub3.com), and try to CNAME them to corresponding subfolders. I decided not to use url redirect because it doesnt hide www.mydomian.com, and also not to use frame url forwarding because iframe kills the theme responsiveness. Now the only choice left is to use CNAME method.

My question is how to modify the .htaccess to do that? or some other way even better? I am not a server guy, and i have done the searches, didnt get what i want. Appreciate anyone who could help me out.

1
  • people in serverfault fail to identify when it is a server question :(. It seems like you lack understanding of the technology involved (CNAME has nothing to do with subfolders) and I suggest that you ask first your hosting support as the actual details on how to achieve what you want might change between hosting companies. Sep 12 '14 at 17:54
0

This is outside the realm of WordPress. I'll give you a basic answer that should help you figure out what you need to do.

The general idea is you will point your new domain names to point to your web server's IP address. Then your web server will see which domain name is being called and then route it accordingly.

If you have a dedicated server, you'll probably set A record which says send the domain name to this IP address. Most web-hosting companies have their own name server that you'll point the domain names to and they'll take care of the rest.

In Apache, you configure the Virtual Host (VHOST) file to route a domain name to a folder. Now many web-hosting companies provided an interface for doing this. In fact, many will not allow you to manually edit the VHOST because of their infrastructure.

The best thing to do is look at how to add multiple domains to your server from your web hosting company.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy