.htaccess mod_rewrite subdomains
- by Aaron
.htaccess:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{HTTP_HOST} ^site\.com$ [NC]
RewriteRule ^(.*)$ http://www.site.com/$1 [L,R=301]
RewriteRule ^new/?$ index.php?section=new
This works great and all, but I have recently implemented a subdomain m.site.com which reads off of a /mobile directory. When…