apache - multiple conditions in .htaccess redirect with both if and or -


im trying setup htaccess redirect "domain.com" "www.domain.com" if request not "t.domain.com"

below takes care of first part:

    rewritecond %{http_host} !^$     rewritecond %{http_host} !^www\. [nc]     rewritecond %{https}s ^on(s)|     rewriterule ^ http%1://www.%{http_host}%{request_uri} [r=301,l] 

but how extend not redirect if request "t.domain.com"?

thanks!

you can use:

rewritecond %{http_host} !^(www|t)\. [nc] rewritecond %{https}s ^on(s)| rewriterule ^ http%1://www.%{http_host}%{request_uri} [r=301,l] 

Comments

Popular posts from this blog

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -

php - Magento - Deleted Base url key -

android - How to disable Button if EditText is empty ? -