Skip to content

Commit

Permalink
Merge pull request #17 from BKWLD/encode-redirects
Browse files Browse the repository at this point in the history
Encore routes in redirects
  • Loading branch information
weotch authored Feb 21, 2023
2 parents 918e11d + 371c425 commit 0937425
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion modules/create-netlify-redirects.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ export default function() {

// Append rules
rules.forEach(rule => {
redirects += `\n${rule.from} ${rule.to} ${rule.code}!`
const from = encodeURI(rule.from), to = encodeURI(rule.to)
redirects += `\n${from} ${to} ${rule.code}!`
})

// Write file
Expand Down

0 comments on commit 0937425

Please sign in to comment.