You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Nathan Ollerenshaw <na...@valuecommerce.ne.jp> on 2003/06/09 11:24:34 UTC
[users@httpd] rewrite/url munging question
Hi there,
I'm wondering if anyone has any ideas on the following;
I need to be able to take a url like
http://foo.bar.com/customers-site.com/...
and have the server rewrite internally to
http://customers-site.com/...
(The reason for this is that when a customer creates an account on our
system, we want them to be able to 'see' a version of their site right
away, without waiting for DNS to work)
I've thought of a few ways, but they all seem rather complex or too
heavy.
One way, the simplest, was to simply stick an Alias for each site in
the VirtualHost for each customer. But, that seems messy.
Another way I thought would be to use mod_rewrite, however I think to
do this, I will need mod_proxy installed.
I've tried a few things with mod_rewrite, but they don't work for
various reasons.
Anyone done this and able to share their solution? Or at least, an idea
of what I could do.
Regards,
Nathan.
--
Nathan Ollerenshaw - Systems Engineer - Shared Hosting
ValueCommerce Japan - http://www.valuecommerce.ne.jp
In the days, When we were swinging form the trees
I was a monkey, Stealing honey from a swarm of bees
I could taste, I could taste you even then
And I would chase you down the wind
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] rewrite/url munging question
Posted by Zac Stevens <zt...@cryptocracy.com>.
Hi Nathan,
On Mon, Jun 09, 2003 at 06:24:34PM +0900, Nathan Ollerenshaw wrote:
> http://foo.bar.com/customers-site.com/...
>
> and have the server rewrite internally to
>
> http://customers-site.com/...
>
> (The reason for this is that when a customer creates an account on our
> system, we want them to be able to 'see' a version of their site right
> away, without waiting for DNS to work)
What you've described is, more or less, HTTP/1.0 - you'd like for things to
work without supplying the "correct" Host: header. As a result, you can
get away without avoiding the wheel on this one. Have a look at the
ServerPath directive, and I'd suggest reading the following discussion of
how VHost matching works in Apache:
http://httpd.apache.org/docs-2.0/vhosts/details.html
Cheers,
Zac
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org