FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » HTTP headers and header()
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: HTTP headers and header() [message #176647 is a reply to message #176646] Sat, 14 January 2012 02:58 Go to previous messageGo to previous message
Sandman is currently offline  Sandman
Messages: 32
Registered: August 2011
Karma:
Member
Thanks Arno. I thought as much, but thank you for confirming.

I had wanted vanity.user.com to resolve to example.com/user.
It seems there are only 2 possible half-solutions:
1. Use redirects, which change the location bar as I mentioned
originally.
2. Use VirtualHosts which does not change the location bar. But with
this solution, vanity.user.com/user resolves to example.com/user.
Which is not really what I wanted.

Ah well, my users will have to live with this.

Regards,
Sandman


On Jan 13, 5:40 pm, Arno Welzel <use...@arnowelzel.de> wrote:
> Sandman, 2012-01-13 21:47:
>> 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)
>
> This is not possible. *Either* redirect *OR* keep the location.
>
> If you don't want this, you have to set up a virtual host in Apache
> which acts as a proxy for example.com/user.
>
> --
> Arno Welzelhttp://arnowelzel.dehttp://de-rec-fahrrad.de
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: error from phpadmin
Next Topic: list() Struktur auslagern
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Nov 28 16:30:45 GMT 2024

Total time taken to generate the page: 0.04198 seconds