Icon_search

February 2009

Redirect www Subdomain to no-www

Posted on 02/12/09 by Travis
27 Comments

Why do sites still use the www subdomain? Some people, including most of us here at Plexus, think that it's deprecated. It's really only a subdomain, and there's absolutely no reason that it should still be used. But, I don't want to get into an argument about whether it's needed or not, I'm just going to show you how to redirect the www subdomain to no subdomain.

All you have to do is add the following lines to your .htaccess or .conf file:

# Redirect www.site.com to site.com with 301
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]

That's it!

In the interest of fairness, I've decided to also show you how to redirect no-www to the www subdomain.

# Redirect site.com to www.site.com with 301
RewriteCond %{http_host} ^site.com [nc]
RewriteRule ^/(.*)$ http://www.site.com/$1 [r=301,nc]

Remember, with great power comes great responsibility. With that said, you should NEVER use that second code sample unless you absolutely have to (ie when Firefox gives an error about the security certificate only being valid for www.site.com).

Tagged:  nowww, conf, rewrite

Back to top

Natalie2

Calling All Tennis Fans

Posted on 02/09/09 by Natalie
28 Comments

The University of Georgia Dan Magill Tennis Complex has been selected to host the 2010 and 2012 NCAA Division I Men's and Women's Tennis Championships.

The best collegiate tennis teams and student-athletes from across the country will be in Athens to showcase their talents and compete for national titles. The Dan Magill Tennis Complex has played host to the men's NCAA Championships 21 times and the women's NCAA Championships four times, most recently in 2007.

The 2010 event (May 20-31) will mark the fifth consecutive year that both the men's and women's titles will be contested in the same location. In 2006, Stanford played host while Georgia followed in 2007 and Tulsa in 2008. The 2009 NCAA Tennis Championships will be at Texas A&M in May. For the men, the NCAA will crown its 65th champion in 2010. For the women, the 2010 champion will mark the 29th. The 2011 NCAA Championships will be at Stanford. Then, the 2012 NCAA Championships return to Athens May 17-28.

Speaking as someone who has attended several NCAAs including Palo Alto, California (Stanford) and Tulsa, Oklahoma (University of Tulsa), Athens is definitely the best venue (no bias here of course). Athens has the most tennis fans by far that come out to watch play and support the tournament. Similar to a UGA football game only on a smaller scale, the NCAAs in Athens brings tailgaters, rowdy fans and an overall great time! Can't wait for the 2010 event - hopefully UGA Men's Tennis will be going for a four-peat! Go Dawgs!

Tagged:  UGA Tennis, university of georgia, athens ga

Back to top

Removing a file from remote SVN repo without deleting your local copy

Posted on 02/09/09 by Travis
26 Comments

I've been guilty of accidentally adding a local configuration file into Subversion in the past. At best it will only cause another user's project or file to be conflicted or throw an error. At worst it will keep the remote project from updating as expected (causing some interesting server problems).

I've often wondered if there were a way to remove the file from the remote Subversion repository without deleting it from my local working copy. Turns out, it's a lot easier than I thought just by adding the --keep-local option.

svn rm log/development.log --keep-local

NOTE: This option is only available in versions of subversion >= 1.5.

Tagged:  svn, subversion

Back to top