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

RE: [cobalt-users] Redirect



Add something like this to you httpd.conf file:

############################################################################
##
### Virtual Hosts
#
# VirtualHost: If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry
about
# IP addresses. This is indicated by the asterisks in the directives below.
#
NameVirtualHost *

<Virtualhost www.domain1.com:80>
	DocumentRoot /www/docs/www.domain1.com
	ServerName www.domain1.com
	ServerAlias domain1.com
	ServerAdmin webmaster@xxxxxxxxxxx
	ErrorLog /var/log/httpd/www.domain1.com/error_log
	CustomLog /var/log/httpd/www.domain1.com/access_log combined
</VirtualHost>

<Virtualhost www.domain2.com:80>
	DocumentRoot /www/docs/www.domain2.com
	ServerName www.domain2.com
	ServerAlias domain2.com
	ServerAdmin webmaster@xxxxxxxxxxx
	ErrorLog /var/log/httpd/www.domain2.com/error_log
	CustomLog /var/log/httpd/www.domain2.com/access_log combined
</VirtualHost>
############################################################################
##



If you need to ensure that SSL on a specific resource add something like the
following to the Virtualhost block:


	RewriteEngine on
	RewriteLog /dev/null

	# rewrite to redirect http to https for a resource
	# if client doesn't try to access https, then redirect to https
	RewriteCond %{REQUEST_URI} /secure_example [NC]
	RewriteCond %{SERVER_PORT} !^443$
	RewriteRule ^(.*) https://%{SERVER_NAME}$1 [L,R]



Jim Moreno
Texas Web Networks



-----Original Message-----
From: cobalt-users-admin@xxxxxxxxxxxxxxx
[mailto:cobalt-users-admin@xxxxxxxxxxxxxxx]On Behalf Of Guillermo Garcia
Sent: Friday, March 21, 2003 8:59 AM
To: cobalt-users@xxxxxxxxxxxxxxx
Subject: Re: [cobalt-users] Redirect


hi

i have a problem here i got a qube 3 appliance is there any way to use
virtual hosts here to have more than one site running on the server

thanks


----- Original Message -----
From: "John A. Federico" <cobalt@xxxxxxxxxxxxxxxxxx>
To: <cobalt-users@xxxxxxxxxxxxxxx>
Sent: Friday, March 21, 2003 8:42 AM
Subject: Re: [cobalt-users] Redirect


> On Thu, 20 Mar 2003, Todd W wrote:
>
> > I was wandering if there was a way to redirect a site like this:
> >
> > person goes to www.domain.com and they are redirected to
> > www.domain2.com/folder
>
> Use mod_rewrite:
>
> http://httpd.apache.org/docs/mod/mod_rewrite.html
>
> This guide is also very helpful:
>
> http://httpd.apache.org/docs/misc/rewriteguide.html
>
> Set up your .htaccess file like this:
>
> RewriteEngine on
> RewriteRule   ^/?$  /directoryName/  [R]
>
> hth
>
> -jf.
>
> _____________________________________
> 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
>

_____________________________________
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