[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [cobalt-users] RAQ4 Rewrite rule
- Subject: RE: [cobalt-users] RAQ4 Rewrite rule
- From: "John Cordeiro" <jcordeiro@xxxxxxxx>
- Date: Sun Nov 12 12:49:01 2000
- List-id: Mailing list for users to share thoughts on Cobalt products. <cobalt-users.list.cobalt.com>
Hey Brandon thanks for the ref. here is what I found:
Virtual User Hosts
<Snip>
Description:
Assume that you want to provide www.username.host.domain.com for the
homepage of username via just DNS A records to the same machine and without
any virtualhosts on this machine.
Solution:
For HTTP/1.0 requests there is no solution, but for HTTP/1.1 requests which
contain a Host: HTTP header we can use the following ruleset to rewrite
http://www.username.host.com/anypath internally to /home/username/anypath:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.[^.]+\.host\.com$
RewriteRule ^(.+) %{HTTP_HOST}$1 [C]
RewriteRule ^www\.([^.]+)\.host\.com(.*) /home/$1$2
</Snip>
Will this work or do I need to alter the Cond or rule first.
Also How so I simply do this using Mod_rewrite in a .htaccess file.
Thanks
John Cordeiro
-----Original Message-----
From: cobalt-users-admin@xxxxxxxxxxxxxxx
[mailto:cobalt-users-admin@xxxxxxxxxxxxxxx]On Behalf Of Brandon Wheaton
Sent: Saturday, November 11, 2000 5:27 AM
To: 'cobalt-users@xxxxxxxxxxxxxxx'
Subject: RE: [cobalt-users] RAQ4 Rewrite rule
> I'm trying to create a rewrite rule in httpd.conf. I am
> trying to rewrite www.domain.com/~user to www.user.domain.com
> has anyone done this this way or is there a better way to do
> this. I searched the apache docs but cant find the specifics.
http://www.apache.org/docs/mod/mod_rewrite.html
http://www.apache.org/docs/misc/rewriteguide.html
Take care.
Brandon Wheaton
UNIX Systems Engineer
ValiCert, Inc.
1215 Terra Bella Ave.
Mountain View, CA 94043
650.280.UNIX
----
Computers are useless; they can only provide answers.
~Pablo Picasso
_______________________________________________
cobalt-users mailing list
cobalt-users@xxxxxxxxxxxxxxx
To Subscribe or Unsubscribe, please go to:
http://list.cobalt.com/mailman/listinfo/cobalt-users