Sandman
2012-01-13 20:47:30 UTC
Hello,
I run a website which allows users to create profiles for
themselves, i.e. example.com/user. Recently I've had a request for
custom domains, i.e. where vanity.user.com would take a browser to
example.com/user.
Using my own domain, I changed vanity.user.com so it resolves to
the IP address of my webserver. Since I run apache, I created a
RewriteRule so if the HOST header matched vanity.user.com it would
redirect permanently to example.com/user.
Upon redirection however, the location bar in my browser updates
to example.com/user. Does anyone know if there is a way to:
1. Redirect the vanity domain to the user's profile.
2. Keep the location bar the same (i.e. vanity.user.com)
I'm cross-posting to comp.lang.php because I was wondering if the
header() function might help.
Thanks!
Sandman
I run a website which allows users to create profiles for
themselves, i.e. example.com/user. Recently I've had a request for
custom domains, i.e. where vanity.user.com would take a browser to
example.com/user.
Using my own domain, I changed vanity.user.com so it resolves to
the IP address of my webserver. Since I run apache, I created a
RewriteRule so if the HOST header matched vanity.user.com it would
redirect permanently to example.com/user.
Upon redirection however, the location bar in my browser updates
to example.com/user. Does anyone know if there is a way to:
1. Redirect the vanity domain to the user's profile.
2. Keep the location bar the same (i.e. vanity.user.com)
I'm cross-posting to comp.lang.php because I was wondering if the
header() function might help.
Thanks!
Sandman