FreshPorts -- The Place For Ports If you buy from Amazon USA, please support us by using this link.
Follow us
Blog
Twitter

Website Feedback
 New Topic  |  Go to Top  |  Go to Topic  |  Search  |  Log In   Previous Message  |  Next Message 
 freshports.org versus www.freshports.org
Author: Piet Delport 
Date:   23-09-02 13:59

As you know, FreshPorts is accessible with or without the "www." prefix to its domain name.

This is a Good Thing, but in the long run, not having a canonical hostname causes some problems. Probably most notable is that caching proxies can't know, in general, when two hostnames actually refer to the same underlying site, which leads to inefficient caching (in the worst case, everything can get cached twice, or once for each different hostname).

This can be easily avoided, while keeping the site accessible through both hostnames, by making one of the hostnames a redirect to the other. This can be accomplished by placing something like the following in Apache's httpd.conf:

NameVirtualHost 216.187.87.230

<VirtualHost 216.187.87.230>
ServerName www.freshports.org
[...rest of settings...]
</VirtualHost>
<VirtualHost 216.187.87.230>
ServerName freshports.org
Redirect permanent / http://www.freshports.org/
</VirtualHost>

(...or the other way around, if you prefer it without the www. prefix, like i do. I saw that the FreshPort report mails refer to www.freshports.org, though.)

With the above in place, a request of "http://freshports.org/foo/bar" will instantly redirect the browser to "http://www.freshports.org/foo/bar".

 Reply To This Message  |  Forum List  |  Flat View   Newer Topic  |  Older Topic 

 
 Topics Author  Date
 freshports.org versus www.freshports.org   new
Piet Delport 23-09-02 13:59 
 Re: freshports.org versus www.freshports.org   new
JunkMale 17-10-02 15:05 
 Re: freshports.org versus www.freshports.org   new
Piet Delport 19-10-02 10:56 
 Re: freshports.org versus www.freshports.org   new
JunkMale 25-10-02 07:52 


 Forum List  |  Need a Login? Register Here 
 User Login
 User Name:
 Password:
 Remember my login:
   
 Forgot Your Password?
Enter your email address or user name below and a new password will be sent to the email address associated with your profile.


Servers and bandwidth provided by
New York Internet, SuperNews, and RootBSD
Valid HTML, CSS, and RSS.
Copyright © 2000-2013 DVL Software Limited. All rights reserved.