Hello! I can’t seem to figure out the right way to get redirects to work on my help center. The below examples are just tests, ideally I’d like to redirect a subfolder to a new subfolder.
- I’ve tried storing them in
- I’ve tried using the following build commands:
hugo && cp _redirects /_redirects
hugo && cp _redirects public/_redirects
- I’ve tried with and without
- I’ve tried using full URLs
Note: no matter how many redirects i put in the
_redirects file, the log says 1 redirect rule successfully processed.
/mytest2 /developers 301! /news /blog 301 https://deploy-preview-129--bolt-docs.netlify.app/mytest2 https://deploy-preview-129--bolt-docs.netlify.app/developers https://deploy-preview-129--bolt-docs.netlify.app/mytest3 https://deploy-preview-129--bolt-docs.netlify.app/shoppers 301 https://deploy-preview-129--bolt-docs.netlify.app/mytest4 https://deploy-preview-129--bolt-docs.netlify.app/merchants 301!
Note: the log says 3 redirect rules succesfully processed.
[redirects]] from = "/old-path" to = "/new-path" status = 301 force = false [[redirects]] from = "/releases" to = "/shoppers" status = 301 force = true
- does this kind of testing work in deploy previews?
_redirects, does the number of spaces or tabs inbetween matter?
- does it take a certain amount of time to work and i need to wait to validate?