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
Post a Comment