.htaccess mod_rewrite subdomains
Posted
by
Aaron
on Stack Overflow
See other posts from Stack Overflow
or by Aaron
Published on 2012-07-04T02:50:41Z
Indexed on
2012/07/04
3:15 UTC
Read the original article
Hit count: 176
.htaccess
|mod-rewrite
.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 accessing m.site.com/new
it will not display anything except return a server error. What can I do to correct this problem?
Basically, I want http://m.site.com/new
To achieve the same affect as http://www.site.com/new
© Stack Overflow or respective owner