1 Answer
- Newest
- Most votes
- Most comments
0
I solved the issue. My regex was incorrect because I didn't realize it uses JavaScript regular expression literals. I thought the first / was also part of the regex. When I noticed this, I changed the regex, and it now works.
[
{
"source": "</^\\/en-US\\/[^.]+$|\\.(?!(css|gif|ico|jpg|js|png|txt|svg|woff|woff2|ttf|map|json|webp)$)([^.]+$)/>",
"status": "200",
"target": "/en-US/index.html"
},
{
"source": "</^\\/nl\\/[^.]+$|\\.(?!(css|gif|ico|jpg|js|png|txt|svg|woff|woff2|ttf|map|json|webp)$)([^.]+$)/>",
"status": "200",
"target": "/nl/index.html"
},
{
"source": "/",
"status": "301",
"target": "/en-US"
}
]
answered 9 days ago
Relevant content
- Accepted Answerasked 9 months ago
- asked 2 years ago
- asked 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 3 months ago