Thank you, that partially works - but I think the rewrite rules in the /forum/ directory are interfering with it.
http://sub.example.com directs to
http://www.example.com/forum/forumdisplay.php?f=3 which directs to
http://sub.example.com/forum/forum-name/
Currently, I have a subdomain
http://forum.example.com pointing to my forum directory (/public_html/forum/). The forum itself has its own rewrite rules to provide nice urls.
http://forum.example.com/forumdisplay.php?f=3 directs to
http://forum.example.com/forum-name/
Below is /public_html/forum/.htaccess
# Comment the following line (add '#' at the beginning)
# to disable mod_rewrite functions.
# Please note: you still need to disable the hack in
# the vBSEO control panel to stop url rewrites.
RewriteEngine On
# Some servers require the Rewritebase directive to be
# enabled (remove '#' at the beginning to activate)
# Please note: when enabled, you must include the path
# to your root vB folder (i.e. RewriteBase /forums)
#RewriteBase /
RewriteRule ^((urllist|sitemap).*\.(xml|txt)(\.gz)?)$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L]
RewriteCond %{REQUEST_FILENAME} -f
RewriteCond %{REQUEST_FILENAME} (admincp|modcp|clientscript|cpstyles|images)/
RewriteRule ^(.*)$ $1 [L]
RewriteCond %{QUERY_STRING} !vbseourl=
RewriteCond %{REQUEST_FILENAME} !chat
RewriteRule ^(.*\.php)$ vbseo.php?vbseourl=$1&%{QUERY_STRING} [L]
RewriteRule ^(archive/.*)$ vbseo.php?vbseourl=$1&%{QUERY_STRING} [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ vbseo.php?vbseourl=$1&%{QUERY_STRING} [L]
I would like to keep the above rules, but make
http://sub.example.com direct to
http://www.example.com/forum/forumdisplay.php?f=3 not
http://sub.example.com/forum/forum-name/.
Thanks again!