Subdomain to folder htaccess

Posted by mikelbring on Stack Overflow See other posts from Stack Overflow or by mikelbring
Published on 2010-05-17T05:31:12Z Indexed on 2010/05/17 5:40 UTC
Read the original article Hit count: 148

Filed under:
|
|

I am trying to point sub.domain.com to domain.com/app/*sub, but the farthest I can get is making it a redirection and I do not want it to redirect. Here is what I have, it works but it redirects it instead of staying on the subdomain, which is what I want.

RewriteCond %{HTTP_HOST} ^(.*).example.com
RewriteCond %{HTTP_HOST} !^www.example.com [NC]
RewriteRule ^(.*)$ http://example.com/app/%1/$1 [L]

© Stack Overflow or respective owner

Related posts about mod-rewrite

Related posts about .htaccess