[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-users] Redirect
- Subject: Re: [cobalt-users] Redirect
- From: "Bryan - Utopian Web Productions" <bryan@xxxxxxxxxxx>
- Date: Fri Oct 20 01:59:01 2000
- List-id: Mailing list for users to share thoughts on Cobalt products. <cobalt-users.list.cobalt.com>
> I've setup our server to handle 'Parked' domains in much the way you're
> looking for.
>
> To achieve this I made the following changes:
>
> (1) Reserve an IP for 'parked' domains.
> (2) Setup parked.netfocus-solutions.net on the reserved IP
(194.25.124.155)
> (3) Setup the DNS of any parked domains to point to this IP
> (4) Modify /etc/httpd/conf/httpd.conf to stop the domain name being
> re-written:
> I've commented out any lines beginning 'Rewrite'
> i.e.,
>
> NameVirtualHost 194.205.124.155
> <VirtualHost 194.205.124.155>
> ServerName parked.netfocus-solutions.net
> ServerAdmin site2
> DocumentRoot /home/sites/site2/web
> #RewriteEngine on
> #RewriteCond %{HTTP_HOST} !^194.205.124.155(:80)?$
> #RewriteCond %{HTTP_HOST}
> !^parked.netfocus-solutions.net(:80)?$
> #RewriteRule ^/(.*)
> http://parked.netfocus-solutions.net/$1 [L,R]
> #RewriteOptions inherit
> AliasMatch ^/~([^/]+)(/(.*))? /home/sites/site2/users/$1/web/$3
> AliasMatch ^/users/([^/]+)(/(.*))? /home/sites/site2/users/$1/web/$3
> AddHandler cgi-wrapper .cgi
> AddHandler cgi-wrapper .pl
> AddHandler server-parsed .shtml
> AddType text/html .shtml
> </VirtualHost>
>
>
> (5) The website at parked.netfocus-solutions.net has a simple PHP script
> that displays our logo with a "Welcome to " + HTTP_HOST
> Where HTTP_HOST is a variable that contains the requested domain
name.
>
> Point (4) above is probably the answer to your question but I've outlined
> the procedure for completeness.
John,
Would this method also work to hold a sub-domain? I need to keep the
sub-domain from rewriting to the top level domain (wildcards are being
used). Basically, we are hand out a sub-domain to an affiliate. The
scripting then recognizes the affiliate through a database query for the
sub-domain. I want the sub-domain to follow throughout the site and not
default to the top-level domain.
Bryan