You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Mike Z <ta...@spamcop.net> on 2006/02/10 21:21:54 UTC
[users@httpd] Rewriting HTTP_HOST to directories
Good afternoon,
After reading through the mod_rewrite and rewrite guide docs and
tinkering with things a bit, I have to admit I'm still in the dark. Here
is what I'm attempting to do:
I'm setting up service to offer domain names to users on a free web
hosting service. Currently, when a user signs up with the free service,
they receive a subdirectory on our site, in the form of
/var/www/html/ourhost.com/user. As doing virtual hosts for all the
potential users is impractical, and the mass virtual hosting can't
translate into this directory structure, I'd like to use a RewriteMap to
translate domains to these directories, e.g.
test.com /var/www/html/ourhost.com/user
Can someone provide me with a bit of help as to how to accomplish this?
Thank you,
Mike
---------------------------------------------------------------------
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] Rewriting HTTP_HOST to directories
Posted by Mike Z <ta...@spamcop.net>.
My apologies. To clarify:
The RewriteMap will contain the domain and the user it maps to. If the
user joeblow has test.com, then the map will be:
test.com joeblow
Thanks.
Joshua Slive wrote:
> On 2/10/06, Mike Z <ta...@spamcop.net> wrote:
>
>> Good afternoon,
>>
>> After reading through the mod_rewrite and rewrite guide docs and
>> tinkering with things a bit, I have to admit I'm still in the dark. Here
>> is what I'm attempting to do:
>>
>> I'm setting up service to offer domain names to users on a free web
>> hosting service. Currently, when a user signs up with the free service,
>> they receive a subdirectory on our site, in the form of
>> /var/www/html/ourhost.com/user. As doing virtual hosts for all the
>> potential users is impractical, and the mass virtual hosting can't
>> translate into this directory structure, I'd like to use a RewriteMap to
>> translate domains to these directories, e.g.
>>
>> test.com /var/www/html/ourhost.com/user
>>
>> Can someone provide me with a bit of help as to how to accomplish this?
>>
>
> Your problem is not well-specified. How is apache supposed to know the user?
>
> Joshua.
>
> ---------------------------------------------------------------------
> 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
>
>
>
---------------------------------------------------------------------
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] Rewriting HTTP_HOST to directories
Posted by Joshua Slive <jo...@slive.ca>.
On 2/10/06, Mike Z <ta...@spamcop.net> wrote:
> Good afternoon,
>
> After reading through the mod_rewrite and rewrite guide docs and
> tinkering with things a bit, I have to admit I'm still in the dark. Here
> is what I'm attempting to do:
>
> I'm setting up service to offer domain names to users on a free web
> hosting service. Currently, when a user signs up with the free service,
> they receive a subdirectory on our site, in the form of
> /var/www/html/ourhost.com/user. As doing virtual hosts for all the
> potential users is impractical, and the mass virtual hosting can't
> translate into this directory structure, I'd like to use a RewriteMap to
> translate domains to these directories, e.g.
>
> test.com /var/www/html/ourhost.com/user
>
> Can someone provide me with a bit of help as to how to accomplish this?
Your problem is not well-specified. How is apache supposed to know the user?
Joshua.
---------------------------------------------------------------------
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