[NTLUG:Discuss] Apache redirect....doesn't

Richard Geoffrion ntlug at rain.lewisville.tx.us
Tue Mar 5 11:47:51 CST 2002


Can anyone point out what I may be doing incorrectly in trying to redirect
URL1 to URL2?

Here is what I have in my web server configuration.  According to all of the
documentation I've read, http://domainname.com SHOULD redirect to
http://www.domainname.com.  What is currently happening is that ANY virtual
web site that is addressed without the 'www.' prefix to the domain name is
being sent to the default web site directory.

[snip]

<VirtualHost 192.168.0.1>
    Redirect http://domainname.com http://www.domainname.com
    ServerAdmin webmaster at domainname.com
    DocumentRoot /home/domainname/public_html
    ServerName www.domainname.com
    ErrorLog /var/log/domainname-error_log
    CustomLog /var/log/domainname-access_log common
</VirtualHost>
[/snip]

I've tried..

Redirect domainname.com http://www.domainname.com
and
Redirect  /   http://www.domainname.com

...to no avail.

UG!  Any suggestions?

-Richard






More information about the Discuss mailing list