Re: www. not working
| From: | Jim Lucas | Date: | Sat, 16 Feb 2008 02:49:49 +0000 |
| Subject: | Re: www. not working | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-269397@lists.php.net to get a copy of this message | ||
nihilism machine wrote:
this still does not work, if a domain has no preceeding www. it redirects to http://www.www.site.com, if it has a www. it goes to www.www.mydomain.com, any ideas?If you are running Apache, you do realize that all of this can be done in Apache instead of PHP right? Here is an example of what I have on my domain. <VirtualHost x.x.x.x:80>
ServerName example.com
ServerAlias wwww.example.com
ServerAlias ww.example.com
RedirectMatch (.*) http://www.example.com$1
</VirtualHost>
Jim Lucas