Redirects with :splat broken

We are trying to redirect to our docs with a wildcard but it is not working correctly.
Let’s look at the following redirect rule for example:

/documentation/* https://abibuilder.cs.uni-tuebingen.de/archive/openms/Documentation/release/latest/html/:splat 200

https://openms.netlify.app/documentation/index.html - works
https://openms.netlify.app/documentation/ - works
https://openms.netlify.app/documentation - fails

According to your docs, https://openms.netlify.app/documentation should just normalize to https://openms.netlify.app/documentation/. Why does it behave different? This does not make sense.

Hi @jpfeuffer,

Thanks for reaching out and welcome to Netlify’s Support Forums!

Have you seen our Support Guide for troubleshooting redirects:

There’s a specific section on splats here.

You mention that you have this redirect:

/documentation/* https://abibuilder.cs.uni-tuebingen.de/archive/openms/Documentation/release/latest/html/:splat 200

If you add the following redirect (above the redirect mentioned just above) does the issue get resolved:

/documentation/ https://abibuilder.cs.uni-tuebingen.de/archive/openms/Documentation/release/latest/html/:splat 200

Let us know if you have any questions.

I tried but I did not expect a fixed redirect to a “:splat” URL to work. I assume it was a copy-paste error on your side.

Even without “:splat” it does not work.
See the preview on Try suggestion from netlify: Update _redirects by jpfeuffer · Pull Request #80 · OpenMS/OpenMS-website · GitHub

Hey,

It looks like at least for one example, the page does exist. The redirect won’t work as long as it exists, it will return a 200. Can you please try removing the existing pages underneath /documentation/* to see if that helps?

Ex: https://openms.netlify.app/documentation/install_win.html exists so it will not redirect to https://abibuilder.cs.uni-tuebingen.de/archive/openms/Documentation/release/latest/html/install_win.html

Hi @katrina-r

I am not sure I understand. https://openms.netlify.app/documentation/install_win.html is already a redirect, which we want to keep. This works as expected.

In the initial post I explained that the general redirect works. Only if you type $domain/documentation without a trailing slash, it does not work correctly.

Using a specific redirect rule without a slash (before the wildcard rule) does not help.

Have you see this thread @jpfeuffer

Thanks. That’s exactly the problem.
Sad that it is still not possible after 4 years.
You can close this.