I need help writing a redirect rule

Hey,

I’m trying to redirect date based URLs to their non-date based counterparts and the regex stuff is way over my head.

What rule will redirect https://www.feverbee.com/2009/10/fundamentallawsofonlinecommunities.html" to “https://www.feverbee.com/fundamentallawsofonlinecommunities/

(All dates start with 20 but not all 2009)

Any help would be greatly appreciated

Edit: I should add that this is the interface I have to work with

Do they all end in .html? or can the extension vary too?

All in .html

Do you have another Redirect Rule related to feverbee you can show me as an example? I have an idea of what the regex should be, but I’m not sure on the format for Source and Destination in the given UI.

I think it will be either of the following for Source

^/20[0-9]{2}/[0-9]{2}/(.*).html$

or

^20[0-9]{2}/[0-9]{2}/(.*).html$

And for the destination

/$1
1 Like

You’re a legend. That first one worked. Thanks for your help Matt.

3 Likes

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