Home > OS >  Https redirection changes to wrong url path
Https redirection changes to wrong url path

Time:01-05

I have been trying to convert my http web links to https using rewrite module. The redirection seems to partially work as the links are converted with https, but then the target url is not as expected.

That is, the original url: http://servername/folder/page_x.aspx But the converted url drops 'folder' from the path: : https://servername/page_x.aspx

Any help or direction towards the fix is highly appreciated!

CodePudding user response:

It can be cause it is forcing a default pattern, if you have not specified one here:

<conditions>
<add input="{HTTPS}" pattern="off" />
</conditions>

It can be because of redirect type such as the example down below:

<action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="Permanent" />
  •  Tags:  
  • Related