.htaccess - Htaccess redirect "www" and static subdomain -


i got htaccess redirect mysite.com www.mysite.com :

rewriteengine on rewritecond %{http_host} !^www\. rewriterule ^(.*)$ http://www.%{http_host}/$1 [r=301,l] 

but have subdomain static.mysite.com , need change htaccess avoid redirect : static.mysite.com www.static.mysite.com.

i'm low in regular expresions. can me?

(sorry bad english)

you can do:

rewriteengine on rewritecond %{http_host} !^(www|static)\. rewriterule ^(.*)$ http://www.%{http_host}/$1 [r=301,l] 

Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -