I’ve got a customer that has two websites, the only difference being the subdomain. Let’s call them http://www.customerwebsite.com and front.customerwebsite.com. The front subdomain is basically a front end, whereas the www is a backend that’s being used the majority of the time by users.
The issue is that they REALLY don’t like the subdomain showing up and would love for their users to just see the standard www instead of front before every page. While I explained that this could potentially cause issues, they still want to explore the idea.
Is there any way I can do a replace on the subdomain via apache2 .htaccess so the user sees http://www.customerwebsite.com but is actually pointed to front.customerwebsite.com? Will it cause issues because http://www.customerwebsite.com is actually a different page?
Are the two hosts effectively hosted on the same server? If so, you might be able to find a solution using
mod_rewrite(not using redirections, but rewrites). I’m not sure how this would work across multipleVirtualHosts, though.Otherwise (and more generally), you should be able to use
mod_proxy_httpand set up a reverse proxy from thewww.host to thefront.host. It’s possible that thefront.site may need to be modified slightly, if certain features require it to be aware it’s usingwww..