| 8:01 pm on Jan 30, 2009 (gmt 0)|
Please see this current thread on an almost-identical subject: [webmasterworld.com...]
| 9:13 am on Jan 31, 2009 (gmt 0)|
thank you for mentioning great resource.
and what if i don't want rewrite the URL, but want to redirect all traffic from sub domain to sub directory via 301 redirect
means from [forum.example.com...]
| 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]
| 1:34 pm on Feb 1, 2009 (gmt 0)|
because i want to transfer all ink juice to the sub directory from sub domain ...
| 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.