LulububuSoftwareGmbH / boltredirector

Handles 301 redirects in Bolt CMS.
16 stars 8 forks source link

Fix jump links #19

Closed AlphaRecon19 closed 7 years ago

AlphaRecon19 commented 7 years ago

This fixes an issue with jump links when using a domain to redirect to. Currently all redirects get prefixed with a forward slash. It looks like jump link is some old functionality that got missed when refactoring the code.

In boltredirector.sahassar.yml:

redirectfoo:
    from: '/foo/{slug:segment}'
    to: 'https://example.com/{slug}'

Before:

< HTTP/1.1 301 Moved Permanently
< Location: /https://example.com/bar
< Content-Type: text/html; charset=UTF-8

After:

< HTTP/1.1 301 Moved Permanently
< Location: https://example.com/bar
< Content-Type: text/html; charset=UTF-8
SvanteRichter commented 7 years ago

LGTM, thanks! 👍