TOML redirects of all links

Hi. I’m changing domains. From old.com to new.com I want all links from old.com to go to new.com so I did:

[[redirects]]
from = "/"
to = "https://new.com"
status = 301
force = true

This works for sending old.com to new.com But I want all blog links from old.com to match and redirect to links on new.com. Example I want all of these links:

old.com/happy
old.com/groovy

to go to

new.com/happy
new.com/groovy

How do I achieve this?

@emi It’s mentioned in the redirects documentation, what you’re looking for are wildcards & splats.

[[redirects]]
from = "/*"
to = "https://new.com/:splat"
status = 301
force = true
1 Like