[Linux-disciples] apache question

Adam Rosi-Kessel adam at rosi-kessel.org
Wed Mar 3 19:01:49 EST 2010


Jamie Forrest wrote, on 3/3/2010 6:12 PM:
> I need to be doing this in IIS but I wanted to see first how it was
> done in Apache. The reason behind masking the url like this is for SEO
> purposes as well as user experience. Actually my example wasn't quite
> right. This is how we need it to work:
>
> myapp.domain.com/folder points to www.domain.com/folder
>
> How would you do this in Apache?

I guess I'm still puzzled at your starting conditions. If you control 
the web server, you can just have the domain names map to the same place 
on the filesystem.

ServerName myapp.domain.com
ServerAlias www.domain.com
DocumentRoot /home/user/public_html/myapp.domain.com

Would result in myapp.domain.com/folder giving the same content as 
www.domain.com/folder, without any visible rewriting of the URL.

(I would also be very skeptical of any SEO benefits here, at least 
insofar as Google and Bing are concerned).


More information about the Linux-disciples mailing list