Redirects not working yet

Hi,

I’ve read through posts here, tried a few things and could use some advice on getting redirects working. Here’s what I know so far:

  1. Added a _redirects file to the /static directory for the site www.beeboxdesigns.com
    (I also tried redirects in netlify.toml)

  2. Contents of the _redirects file

    # example redirect /synthtalk/ios-midi-sequencers   https://www.synthtalk.net/articles/ios-midi-sequencers
    /synthtalk/*  https://www.synthtalk.net/:splat 301
  1. Netlify deploy message indicates _redirects was processed with no errors
    **1 redirect rule processed**
    All redirect rules deployed without errors.
  1. Tested the rules in Netlify playground
    Yay! All redirects are valid

  2. when I test this link for example, it is not redirected
    https://www.beeboxdesigns.com/synthtalk/ios-midi-sequencers/

Thank you for any suggestions

That’s a Netlify thing. Hugo creates a list of actual links, not a wild-card API point.

You probably just want to set the redirect rule in Netlify (check their docs/support). Creating a _redirects file is for setting redirects in front matter of individual pieces of content (and collecting it in a list).

Thanks! I’ll post this in the netlify community, and remove this from Hugo

I created this post, but then realized it is really a Netlify problem and not a Hugo problem. In case you are interested this change solved the issue on Netlify.

@gregraven in the Netlify community pointed out that I needed to use the force redirect with the 301! instead of the 301 directive. Otherwise, Netlify serves the page that is there.

See the definition of “force” in the “syntax” section of the Redirects docs page.

There is more information about this here.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.