Geta / geta-notfoundhandler

The popular NotFound handler for ASP.NET Core and Optimizely, enabling better control over your 404 page in addition to allowing redirects for old URLs that no longer works.
Apache License 2.0
20 stars 16 forks source link

Redirect with query string as new destination forms malformed URL #35

Closed gatisb closed 2 years ago

gatisb commented 2 years ago

example defined redirect:

   <url>
      <old redirectType="Permanent">/some-kind-of-old-url/p11111111122</old>
      <new>/new-url?code=new-code</new>
    </url>

request 1: incoming URL is: https://site/some-kind-of-old-url/p11111111122 redirected to: https://site/new-url?code=new-code All is fine as expected

request 2: incoming URL is: https://site/some-kind-of-old-url/p11111111122?additonalquerystring redirected to: https://site/new-url?code=new-code?additonalquerystring Malformed URL is created with two question marks