For example, one instance of apache is managing www.site.com/folder1/a.html www.site.com/folder2/b.html www.site.com/folder3/c.html
I need to make sure that access to www.site.com/folder3/c.html is https only.
All these folders are in the same document root.
Is this possible? If not, what you recommend as the minimum changes necessary in order to get what I want?
From stackoverflow
-
I believe you can do something in the Apache configuration like:
RedirectMatch /folder3/(.*) https://www.site.com/folder3/$1Not sure if that's proper though.
Hope that helps...
Nathan Spears : This results in an infinite redirection loop. -
You can try this solution:
RewriteEngine On RewriteCond %{HTTPS} !=on RewriteRule ^/folder3/c.html$ https://www.site.com/folder3/c.html$1 [R,L]With this solution you can also define which kind of redirection to apply. And, the most important, the rule will only run when in HTTP scheme.
Nathan Spears : This looked so technical that I thought it must be right! However I can't get any response from this code. Is there some preliminary step I need to take before using this code?
0 comments:
Post a Comment