php - modRewrite RewriteCond to turn off ssl redirect for a certain requested URL -
in website mycreditstatus.co.za, use .htaccess rewrite , redirect url http https , here's code use .htaccess in public_html (http) directory:
rewriteengine on rewritecond %{https} off rewriterule (.*) https://%{http_host}%{request_uri}
it works fine rewrites , redirects http urls https.
the problem website performs requests non-https sites don't want rewrite , redirect of links https.
here's 1 of links don't want redirect/rewrite:
i want know code should write .htaccess on public_ssl (https) directory since request coming there.
have code in .htaccess under public_html dir:
options +followsymlinks -multiviews # turn mod_rewrite on rewriteengine on rewritecond %{https} off rewritecond %{http_host} !^imupost\.co\.za$ [nc] rewriterule ^ https://%{http_host}%{request_uri} [r=301,l]
and have code in .htaccess under public_ssl dir:
options +followsymlinks -multiviews # turn mod_rewrite on rewriteengine on rewritecond %{https} on rewritecond %{http_host} ^imupost\.co\.za$ [nc] rewriterule ^ http://%{http_host}%{request_uri} [r=301,l]
Comments
Post a Comment