Wildcard Redirects not working with dashes

Hello,

The wildcard redirects are amazing and working great for the most part!
However, they are failing when there’s a “-” in the “Old path” URL.

Working:
/products/zeroplay/(.*) → /collections/zeroplay
https://microjig.webflow.io/products/zeroplay/example

Not working:
/products/zeroplay-guide-bar/(.*) → /collections/zeroplay
https://microjig.webflow.io/products/zeroplay-guide-bar/example

This is consistent with all the other redirect rules.


Here is my site Read-Only: LINK

Hello, @andwhy!

Ben here with the Webflow Customer Support Team!

Thanks so much for reporting this behavior. I think I may see the issue with the redirect.

When using Wildcard Redirects you’ll need to escape certain characters. The - is one of those characters. So instead of using this:

/products/zeroplay-guide-bar/(.*) → /collections/zeroplay

It should look like this:

/products/zeroplay%-guide%-bar/(.*) → /collections/zeroplay

You can read more here: 301 redirects | Webflow University

Let me know if you have any other questions, and I’ll be happy to assist you further!

3 Likes

@rileyrichter YES that fixed it. Thank you so much! :smile:

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