apache - htaccess rewrite multiple conditions -
i don´t know how solve problem. need redirect http https in cases:
redirect
http://example.com https://example.com http://example.com/any-url https://example.com/any-url
don´t redirect
http://subdomain1.example.com http://subdomain2.example.com http://example.com/any-file.xml
im turning on ssl domain has certification, , keep xml files without redirection avoid partners issues.
any help?
this rewrite should work:
rewriteengine on rewritecond %{https} !=on rewritecond %{http_host} example.com rewritecond %{request_uri} !\.xml$ rewriterule (.*) https://%{http_host}%{request_uri}
Comments
Post a Comment