How would you 301 redirect calls for /folder to www version of website, without interfering with wildcard subdomains? The issue is, with WordpressMu for example, users will create blogs on subdomains... which is great. Unfortunately, say I installed a forum for support in a /forum directory - any call for /forum will work (bad, duplicate content). www.example.com/forum = good abc.example.com/forum = bad efg.example.com/forum = bad Yet they all work. Can anyone crack this?
RewriteCond %{HTTP_HOST} (example\.com)$ [NC] RewriteCond %{HTTP_HOST} !^www\. [NC] RewriteRule ^/?(forum.*)$ http://www.%1/$1 [R=301,NC] Code (markup): (forum.*) may need to be refined a little depending on what's possible.