Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

trailing slash is removed from redirect

Has anyone stumbled upon this when doing a redirect and do yo usually create a site in iis for http or just handle the redirect in web config alone?

Adding this rule in web.config of an 4.5 project: redirects me to .compage1 (notice slash / sign is missing between .com and page1 in the redirect)

How would you fix this?

Aug 30, 2016 16:53

This works for me with all query strings:

<rule name="HTTP to HTTPS redirect" stopProcessing="true">
    <match url="(.*)" />
    <add input="{HTTPS}" pattern="off" ignoreCase="true" />
    <action type="Redirect" redirectType="Permanent" url="https://{HTTP_HOST}/{R:1}" />
Aug 30, 2016 16:58
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.