<p>So the only work around I've found here is to delete the &quot;/news(.)&quot; entry and re-add it, and that seems to put it at the end of the matching list.</p>
<p>Hope there is a more elegant solution here.</p>

CC BY-SA 4.0
2022-10-11T06:34:53.957Z
2022-10-11T06:34:53.957Z
RocksaltAU
<p>I have a client who has a legacy matching pattern of &quot;/news(.<em>)&quot; which catches all the news pages that have been de-activated and redirects them to a landing news page.  The issues that one particular news page got so much traffic, they decided to make it a main page on the site.  So they want to redirect the traffic from /news/popular-article/ to /site/new-popular-page.  The trouble is... retour catches the now deactivated page in the &quot;/news(.</em>)&quot; redirect - I want it to catch specifically &quot;/news/popular-article/&quot;</p>
<p>How do I sequence the testing of regexes in Retour / prioritise some matches over others?</p>

<plugin-retour>
Ordering the matching of URLs in the Retour Plugin
# Ordering the matching of URLs in the Retour Plugin

(Asked by: username_0 on 2022-10-11)

I have a client who has a legacy matching pattern of "/news(.*)" which catches all the news pages that have been de-activated and redirects them to a landing news page. The issues that one particular news page got so much traffic, they decided to make it a main page on the site. So they want to redirect the traffic from /news/popular-article/ to /site/new-popular-page. The trouble is... retour catches the now deactivated page in the "/news(.*)" redirect - I want it to catch specifically "/news/popular-article/"

How do I sequence the testing of regexes in Retour / prioritise some matches over others?

**Tags:** plugin-retour


---

## 1 answers

### Answer by username_0 on 2022-10-11. Score: 1

So the only work around I've found here is to delete the "/news(.)" entry and re-add it, and that seems to put it at the end of the matching list.

Hope there is a more elegant solution here.


---

