[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [cobalt-users] [RaQ 4] Domain Directing
- Subject: RE: [cobalt-users] [RaQ 4] Domain Directing
- From: "Jolley, Carl" <Carl.Jolley@xxxxxxx>
- Date: Mon Aug 19 13:31:53 2002
- List-id: Mailing list for users to share thoughts on Sun Cobalt products. <cobalt-users.list.cobalt.com>
-----Original Message-----
From: Anthony Guida
Sent: Monday, August 19, 2002 11:59 AM
To: 'cobalt-users@xxxxxxxxxxxxxxx'
Subject: [cobalt-users] [RaQ 4] Domain Directing
I have a customer who has requested a domain redirect on a virtual site that
is hosted with us.
The virtual site is www.tremper.com and its home directory is
/home/sites/www.tremper.com/web
Within the ' web ' directory there is another directory named ' family '
She has pointed a domain www.kortemeier.net to the same IP as
www.tremper.com and wants the
server to be able to distinguish which domain is heading its way.
e.g.
- If a user types in http://www.tremper.com the server serves the page
/home/sites/www.tremper.com/web/index.html
- If a user types in http://www.kortemeier.net the server serves the page
/home/sites/www.tremper.com/web/family/index.html
I am not too sure on how to do this, but we have tried a cgi script and it
works only if you type in the full path - www.kortmeier.net/index.cgi
We found this cgi file here -
http://www.freecode.com/viewsource/domaindirector/readme.txt/
Any info on this would be greatly appreciated.
-------------------------
I suggest that you create a separate virutalhost section in your httpd.conf
for www.kortemeier.net and create a mod-rewrite set for it that will rewrite
the URL to / to the desired URL, for example:
RewriteCond %{HTTP_HOST} =www.kortemeier.net {NC}
RewriteRule ^/$ http://www.tremper.com/family/ {L,R}
Note, if you want the redirection to be entirely internal, i.e.
not be changed on the browser's location box, then leave the ,R out.
Depending on whether or not the /family/index.html file contains links
and what they point to, you may have to specify other RewriteRules.
Depending on how this file is structured it might be a viable alternative
to forget about the Rewrite stuff and simply specify that the DocumentRoot
for www.kortmeier.net is: /home/sites/siteX/web/family (where siteX
corresponds
to the site number for the www.tremper.com site.
Don't try to use the admin GUI to set up the virtual site for
www.kortmeier.net.
Be sure to make a backup copy of your httpd.conf both before AND after you
make
any changes to it.
_____________________________________
cobalt-users mailing list
cobalt-users@xxxxxxxxxxxxxxx
To subscribe/unsubscribe, or to SEARCH THE ARCHIVES, go to:
http://list.cobalt.com/mailman/listinfo/cobalt-users