Redirect subdirectory to subdomain
Just a quick note, lest I forget this. To redirect a subdirectory to a subdomain using .htaccess, use the following:
<ifmodule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^subdirectory(.*)$ http://subdomain.domain.tld$1 [R=301,L] </ifmodule>
(Note the 301 permanent redirect.) The regular expression is greedy, but it takes care of the trailing slashes — just in case. *shrugs*
Read more:
- Redirecting Wordpress feeds to Feedburner
- Taking care of my diecast acrylic display case
- A week in cross-browser-compatibility hell
No Comments Yet