.htaccess - How to stop HTTPS redirection for a subdomain -


currently, have following redirection setup in htaccess redirect www , non-www url https www.

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

i have created subdomain dev.example.com. when run it, site redirects https www. how can stop it, , load dev without redirection?

add condition https rule:

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

Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -