default server serving to change

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

 



I have 5 websites running on a webserver.
I read Apache docs Apache serves the vhost file in alphabetical order
of name of vhost file.

I have a few subdomains on main domain

http://mydomain.com

as follows
http://site1.mydomain.com
http://site2.mydomain.com
http://site3.mydomain.com
http://site4.mydomain.com

in one of them which is served by default I want to redirect to
correct http://mydomain.com
so I added in http://site1.mydomain.com

the ReWriteRule in vhost of site1.mydomain.com as follows


 ReWriteRule ^/mydomain.com$ /var/www/index.html [NC,L]
 ReWriteRule ^/mydomain.com/$ /var/www/index.html [NC,L]

I checked the ReWriteLogs by

ReWriteLog "/var/log/apache2/mydomain_rewrite_log"
ReWriteLogLevel 9

could not understand much.

My problem is the ReWriteRule did not do as I wanted it to do.So I
have written some thing in correct.
Can some one help to find what is the problem in above ReWriteRule?

Thanks.
-- 
Tapas
http://mightydreams.blogspot.com
http://wiki.xensource.com/xenwiki/Xen_on_4_app_servers

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux