httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nate" <>
Subject Rewriting a URL
Date Mon, 03 Jun 2002 16:54:27 GMT
I currently run Redhat 7.2 with Apache 1.3.22. Mod_Rewrite is installed.

Scenario: I want to be able to take a name-based virtual host and point
multiple domains to it, but have all domains be rewritten as the primary
domain. (ie. say I have,,, if I
type those into my browser, I want all of them to be rewritten as

I tried the following:

DocumentRoot /wwwroot/domain1
RewriteEngine on
RewriteCond %{HTTP_HOST}                !^$
RewriteRule ^/(.*)            $1 [L,R]
RewriteOptions inherit

The problem is that I don't completely understand the expressions, and the
info I have found on various sites just don't seem to explain it so it
clicks. Is there a simpler way to say something like "take all domains/hosts
that are aliased to this virtual host and re-write them as" ?

Could anyone point me in the right direction? Should I even be using
mod_rewrite? Ack!  =)

Nate D.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message