Mailing List Archive


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

Re: [tlug] Multiple Domains - Apache



tlug@example.com wrote:
<VirtualHost *:80>
ServerName domaina.com
Redirect permanent / http://www.domaina.com/
</VirtualHost>



Small variation: http://www.domain.net redirects to http://domain.net

<VirtualHost *:80>

       ServerName www.domain.net
       RewriteEngine on
       RewriteRule ^/(.*)$ http://officede.net/$1

</VirtualHost>


this code redirects all page requests correctly to the "real" address, eg

http://www.domain.net/a/b.html is redirected to
http://domain.net/a/b.html


Probably not strictly necessary but the code is straight forward.


Brett




Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links