[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] Using RewriteCond need a bit of help with this one



----- Original Message -----
From: "Douglas Spooner" <webmaster@xxxxxxxxxxxxxx>
To: <cobalt-users@xxxxxxxxxxxxxxx>
Sent: Tuesday, May 15, 2001 5:36 PM
Subject: [cobalt-users] Using RewriteCond need a bit of help with this one


> Greetings!
>      I have just started to play with manipulating URLs with our
> RaQ3i. From the apache site I gleamed some information  on how to kinda
use
> the RewriteCond command as described in
> (http://www.apache.org/DELETE_ME/mod/mod_rewrite.html#RewriteCond) and
some
> of its other functions.
>
> >From what I can see its very flexiable and quite powerful ( well
considering
> I run IIS as well anything seems powerful) I have a client who has three
> domains lets call them apples.com, oranges.com and coconut.com
>
> Each of these domains represents a product that the client sells and he
> wants them mapped to the specific directories on his site. So its one
> website with 3 domains mapped to it.
>
> This I can do with no problem I have created a included file comment in my
> httpd.conf file which pulls through da.conf and maps the domains to the
> correct directories :)
>
> The only problem I am having is making the domain stay when you goto it
and
> not show the directory structure.
>
> For instance if I type in oranges.com what appears in the browser is the
> correct page but in the address bar its
> apples.com/products/oranges/index.html instead of oranges.com
>
> Can I use the stuff described in the apache mod_rewrite to achieve this?
> I've tried lots of different methods described in the article but I'm not
> realy sure what to do.

Here's what I use and it works fine for me.  Your milage may vary.

RewriteCond %{HTTP_HOST}                !^www.acnsnet.com(:80)?$
RewriteRule ^/(.*)                      http://www.acnsnet.com/$1 [L,R]

chuck