amazon web services - URL rewrite rule based on HTTP_X_FORWARDED_PROTO not working AWS Windows EBS -
i have deployed application on windows based elastic beanstalk application , enabled ssl. working fine whether access using http or https.
but want force https on requests have added below rewrite rule in web.config
<rule name="redirect https" enabled="true" stopprocessing="true"> <match url="healthcheck.html" negate="true" /> <conditions> <add input="{http_x_forwarded_proto}" pattern="https" negate="true" /> </conditions> <action type="redirect" url="https://{http_host}/{request_uri}" redirecttype="permanent" appendquerystring="false" /> </rule>
but rule not working , none of request redirected http https. sure http_x_forwarded_proto giving me correct value because have check request.params["http_x_forwarded_proto"] , giving http , https respective requests.
Comments
Post a Comment