I used Apache's virtual host for a ton of subdomains for greptweet.com, where each twitter username is a subdomain, like <username>
.greptweet.com. Problem is ... subdomains can't have underscores! :)
Now I've restructured the site, I want to permanently redirect all users that are going to the subdomain to the path:
<username>
.greptweet.com to the path structure greptweet.com/u/<username>
e.g. http://kaihendry.greptweet.com/ to http://greptweet.com/u/kaihendry/
Ideally I'd like to achieve this nearly in the Apache httpd.conf <VirtualHost>
stanza instead of writing bits into /srv/www/
Something like this would work: