Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hello, Umbracians
Here is my rewrite rule:
<rule name="Force https" stopProcessing="true"> <match url="(.*)" /> <conditions> <add input="{HTTPS}" pattern="^OFF$" /> </conditions> <action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" appendQueryString="true" redirectType="Permanent" /> </rule>
Fore some reason time to time it throws "too many redirects". I have tryed several recomedation, but it's does't works for me.
P.S.
Solutuion has 301 redirect package on board, may be it is important
Try the code below, it has always worked for me. Not sure why you get an loop though. Maybe caching, close ALL incognito, and open a new screen and try it again each time. Your browser might be caching the redirect:
<rule name="RedirectHttpToHttps" stopProcessing="true"> <match url="(.*)" /> <conditions> <add input="{HTTPS}" pattern="off" ignoreCase="true" /> </conditions> <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="Permanent" /> </rule>
Seems you are right about caching, it works for me
Thanks!
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
IIS rewrite redirect looping (too many redirects)
Hello, Umbracians
Here is my rewrite rule:
Fore some reason time to time it throws "too many redirects". I have tryed several recomedation, but it's does't works for me.
P.S.
Solutuion has 301 redirect package on board, may be it is important
Try the code below, it has always worked for me. Not sure why you get an loop though. Maybe caching, close ALL incognito, and open a new screen and try it again each time. Your browser might be caching the redirect:
Seems you are right about caching, it works for me
Thanks!
is working on a reply...