Re: www. not working

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

 



Shawn McKenzie wrote:
Shawn McKenzie wrote:
Shawn McKenzie wrote:
Jim Lucas wrote:
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
Or in DNS zone file (assuming you have an A record for example.com):

www.example.com.                 IN CNAME        example.com.

Many ways to skin a cat, and they are all fun!

-Shawn
Nevermind.  I guess this would already be in place or the conf,
.htaccess or PHP wouldn't even be running.  :-(

I thought about starting a new thread for every different idea that I
had in reply to this post.  What do y'all think?

-Shawn

worth noting somewhere on the net, not quite sure if here is the best place for it to be honest.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux