Feedback on redir doc page

It took me some time to figure out how to do a simple redirect from an old domain to a new domain.
Eventually I managed to do it, but I want to share what happened and see if there’s room to improve the redir doc page.

Objective: I don’t care about preserving URIs, I just want that when you visit any URI you are redirected to

Here’s what I tried first: {
  redir 301

It didn’t work. Then I read that 301 is the default status code, so I simplified it to: {

This did work. Why?
BTW, the doc is not clear whether we should use 301 or [301]. In my first example I tried both but did not help.

The examples of the redir docs have a correct example for what you’re trying to accomplish. What would you like to improve about it?

When describing syntaxes, it’s standard practice to enclose optional arguments in square brackets.

Right, I should have thought about that. Then nothing to improve here.

No problem, I can see how it’s not obvious. Maybe we need a page in the documentation about how to read the documentation! :sweat_smile:

Anyway, thanks for posting this; I am glad it is working for you.

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