Skip to main content
3 votes

Retour Plugin: Redirect Entire Directory to file

FWIW, I would actually recommend doing this rewrite at the web server level, because then these accesses will have a much lower impact on your site. If you add the redirect to Nginx (or whatever your ...
andrew.welch's user avatar
  • 11.6k
3 votes
Accepted

How do I redirect from a legacy category URL to a new catgory URL using Retour

Despite having used regex's for years, I still almost never get them right from memory. A great tool for testing them out is: https://regexr.com/ What you'll need to use is a capture group. Something ...
andrew.welch's user avatar
  • 11.6k
3 votes

RegEx Redirects for Legacy URLs

Here's the regex I think you'll need: \/teachings\/tag\/\d+\/(\w+)\/? → \/teachings\/topics\/$1 \/teachings\/series\/\d+\/(\w+)\/? → \/teachings\/series\/$1 A couple explanations: \/ is an escaped /...
Jalen Davenport's user avatar
  • 3,045
2 votes
Accepted

RexEg Pattern to Exclude Using the Retour Plugin

The RegEx is only the URI part; so something like (.*.png|.*.jpg) is probably what you want.
andrew.welch's user avatar
  • 11.6k
2 votes

Best way to redirect old URLs

You can implement your own redirect. Add a route in /admin/settings/routes Declare it like so: Create a new template templates/page/_redirect.twig: {% set requestedSlug = craft.app.request.getSegment(...
Capsule's user avatar
  • 131
1 vote

Ordering the matching of URLs in the Retour Plugin

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.
RocksaltAU's user avatar
1 vote

Retour Plugin: Redirect Entire Directory to file

Got it. Figured I would keep this here for anyone else looking to do this (or similar). .*/wp-content($|/.*)
gjhead's user avatar
  • 123
1 vote
Accepted

Retour Redirects with Craft and nginx

Retour only works if the 404 actually is handled by Craft; my guess is that your Nginx config somehow is not passing along the 404 to Craft.
andrew.welch's user avatar
  • 11.6k

Only top scored, non community-wiki answers of a minimum length are eligible