Dynamic variable in the middle of redirects

I’ve got an htaccess rule like this:
RewriteRule ^resources/ebooks/(platform-a | platform-b)$ /tools/ebooks/$1/index.html [QSA,L]

I understand :splats can only be used at the end of a redirect. That said, is there a valid way to write this to a redirect in the toml file?

Hi :wave:t6: , welcome to the forums! Please give this a read:

Also give this a try?

[[redirects]]
from = "/resources/ebooks/platform-a"
to = "/tools/ebooks/platform-a/index.html"
[[redirects]]
from = "/resources/ebooks/platform-b"
to = "/tools/ebooks/platform-b/index.html"

1 Like