Reg vhost in apache

Hi all,

I am facing one problem in configuration of httpd-vhosts.
my requirment is if url comes from servername (i.e http://sutra) it
should redirect to my home page.if url comes from serverAlias(i.e
http://sutrateam) it should go to advance search page…if any one
knows how to do pls help me

below file is my vhost file

<VirtualHost :80>
ServerName sutra
ServerAlias srishtisutra
ServerAlias sutrateam
ServerAlias sutrasrishti
DocumentRoot D:/project/sutra/public
<Directory “D:/project/sutra/public”>
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all

RewriteEngine On
# Check for maintenance file and redirect all requests
RewriteCond %{DOCUMENT_ROOT}/system/maintenance.html -f
RewriteCond %{SCRIPT_FILENAME} !maintenance.html
RewriteRule ^.
$ /system/maintenance.html [L]
# Rewrite index to check for static
RewriteRule ^/$ /index.html [QSA]
# Rewrite to check for Rails cached page
RewriteRule ^([^.]+)$ $1.html [QSA]
# Redirect all non-static requests to cluster
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
RewriteRule ^/(.*)$ balancer://mongrel_cluster%{REQUEST_URI}
[P,QSA,L]

with regards
shiva

Shiva,
The easiest way to do that is to create a new vhost for sutrateam that
redirects to http://sutra/advanced-search-page.

Andrei M. wrote:

Shiva,
The easiest way to do that is to create a new vhost for sutrateam that
redirects to http://sutra/advanced-search-page.

Thanks for ur reply.where to place the redirect to
http://sutra/adv-se-page in vhost file

A basic vhost config would be:
<VirtualHost >
ServerName sutrateam
ServerAdmin webmaster@localhost
RewriteEngine on
RewriteRule ^(.
)$ http://sutra/advanced-search-page$1 [L,R]

Andrei M. wrote:

A basic vhost config would be:
<VirtualHost >
ServerName sutrateam
ServerAdmin webmaster@localhost
RewriteEngine on
RewriteRule ^(.
)$ http://sutra/advanced-search-page$1 [L,R]

thanks andrei its working now.