Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][tlug] Multiple Domains - Apache
- Date: Tue, 29 Apr 2008 05:04:51 +0530
- From: Deepan <codeshepherd@example.com>
- Subject: [tlug] Multiple Domains - Apache
Hi All, I am serving two domains from the same machine using Apache. I want www to be used in both of the domains, hence I redirect urls without www to appropriate urls with www. I have the following configuration in httpd.conf to achieve this. NameVirtualHost *:80 <VirtualHost *:80> DocumentRoot /var/www/html/domaina/ ServerName www.domaina.com Options +FollowSymLinks RewriteEngine On RewriteCond %{HTTP_HOST} ^domaina\.com$ [NC] RewriteRule ^(.*)$ http://www.domaina.com$1 [R=301,L] </VirtualHost> <VirtualHost *:80> DocumentRoot /var/www/html/domainb/ ServerName www.domainb.com Options +FollowSymLinks RewriteEngine On RewriteCond %{HTTP_HOST} ^domainb\.com$ [NC] RewriteRule ^(.*)$ http://www.domainb.com$1 [R=301,L] </VirtualHost> However all requests to http://domainb.com/ gets redirected to http://www.domaina.com whereas the expected behaviour is to get redirected to http://www.domainb.com/ . Regards Deepan Photographic Memory Game: http://www.photographicmemorygame.com/ Sudoku Solver: http://www.sudoku-solver.net/
- Follow-Ups:
- Re: [tlug] Multiple Domains - Apache
- From: Josh Glover
- Re: [tlug] Multiple Domains - Apache
- From: dave
- Re: [tlug] Multiple Domains - Apache
- From: Kenneth Burling
- Re: [tlug] Multiple Domains - Apache
- From: Sigurd Urdahl
- Re: [tlug] Multiple Domains - Apache
- From: tlug
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] Re: Adept Manager Dead to the World (Kubuntu-8.04)
- Next by Date: Re: [tlug] Multiple Domains - Apache
- Previous by thread: Re: [tlug] emobile D01NXII data card and (debian) linux? - or how to get an internet connection as fast as possible?
- Next by thread: Re: [tlug] Multiple Domains - Apache
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links