Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #4456

Re: HTTP headers and header()

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail
From Arno Welzel <usenet@arnowelzel.de>
Newsgroups comp.lang.php, comp.infosystems.www.servers.unix
Subject Re: HTTP headers and header()
Date Sat, 14 Jan 2012 02:40:11 +0100
Organization A noiseless patient Spider
Lines 29
Message-ID <4F10DCFB.1060001@arnowelzel.de> (permalink)
References <d16b12f4-efb0-46e7-a585-a4c143c33818@a8g2000pbi.googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding 7bit
Injection-Info mx04.eternal-september.org; posting-host="LDQEG7JhwNN4wgf9ro7Ddg"; logging-data="11661"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/yD2QAy5yq1jX3nmGHwabOc/xSQLW8KgU="
User-Agent Mozilla/5.0 (Windows NT 5.1; rv:9.0) Gecko/20111222 Thunderbird/9.0.1
In-Reply-To <d16b12f4-efb0-46e7-a585-a4c143c33818@a8g2000pbi.googlegroups.com>
Cancel-Lock sha1:HysSuQ7UYoPnI9PfeIDR7Y1ARIk=
Xref x330-a1.tempe.blueboxinc.net comp.lang.php:4456 comp.infosystems.www.servers.unix:55

Cross-posted to 2 groups.

Show key headers only | View raw


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 Welzel
http://arnowelzel.de
http://de-rec-fahrrad.de

Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

HTTP headers and header() Sandman <enjoylife_95135@hotmail.com> - 2012-01-13 12:47 -0800
  Re: HTTP headers and header() The Natural Philosopher <tnp@invalid.invalid> - 2012-01-13 22:07 +0000
  Re: HTTP headers and header() "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2012-01-13 23:32 +0100
    Re: HTTP headers and header() "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2012-01-13 23:33 +0100
  Re: HTTP headers and header() Arno Welzel <usenet@arnowelzel.de> - 2012-01-14 02:40 +0100
    Re: HTTP headers and header() Sandman <enjoylife_95135@hotmail.com> - 2012-01-13 18:58 -0800
      Re: HTTP headers and header() "J.O. Aho" <user@example.net> - 2012-01-14 08:51 +0100
      Re: HTTP headers and header() Arno Welzel <usenet@arnowelzel.de> - 2012-01-14 10:37 +0100
      Re: HTTP headers and header() The Natural Philosopher <tnp@invalid.invalid> - 2012-01-14 11:09 +0000
  Re: HTTP headers and header() Jonathan Stein <jstein@image.dk> - 2012-01-14 15:26 +0100
  Re: HTTP headers and header() "Miquel van Smoorenburg" <miquels@netscum.invalid> - 2012-01-20 15:34 +0000

csiph-web