serve-handler
serve-handler copied to clipboard
Redirect with source "file" path not working correctly to destination
Hello Example: Say I have this redirect
{
"redirects": [
{ "source": "/some/old-path.html", "destination": "/new-path", "type": 301 }
]
}
The result is
HTTP/1.1 301 Moved Permanently
Location: /some/old-path
Date: Fri, 31 Jan 2020 03:39:03 GMT
Connection: keep-alive
instead expected result
HTTP/1.1 301 Moved Permanently
Location: /new-path
Date: Fri, 31 Jan 2020 03:39:03 GMT
Connection: keep-alive
serve version 11.3.0
fyi:
- request: GET /some/old-path.html
response: Location: /some/old-path
cause: config.cleanUrls - request: GET /some/old-path
response: Location: /some/old-path/
cause: config.trailingSlash
to match any of the possible resulting locations (depending on config):
{
"redirects": [
{ "source": "/some/old-path*", "destination": "/new-path" }
]
}