Msg#: 3838387 posted 2:51 pm on Jan 31, 2009 (gmt 0)
I'm not sure why you would want to redirect instead of rewrite -- Redirecting will expose the long, ugly, and complicated subdirectory URL to both users and search engines. Most Webmasters would prefer an internal rewrite, which simply tells the server where to find the content to deliver when the subdomain is requested.
[edited by: jdMorgan at 2:51 pm (utc) on Jan. 31, 2009]
Msg#: 3838387 posted 7:33 pm on Feb 1, 2009 (gmt 0)
WHy would you want to do that? Leave the links and their juice pointing to the URL subdomain.example.com, and simply serve the files stored in the subdirectory when those subdomain URLs are requested. With an internal rewrite, the URL stays the same (subdomain.example.com) and the server just gets the files from the subdomain's assigned subdirectory. There is no reason to tell the search engines or your users *where* the files are stored inside your server, and doing so would make the URLs longer, harder to read and type, and ugly.
This would be sort of like redirecting www.example.com/ to www.example.com/www/user-name/public/html/index.php just because that is the real path in the server's filesystem where the home page of the site is located. There is no reason to do this. Don't do this. Just rewrite subdomain requests to the proper place where the server should get the files, and don't tell the client at all.
The whole point of an internal rewrite is that the URL and the filepath are two different things, and don't even need to resemble each other. Web clients care about URLs, not filepaths.