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 ...
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 ...
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 /...
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.
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(...
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.
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($|/.*)
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.
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
plugin-retour × 10redirect × 4
regex × 3
url × 1
category × 1
nginx × 1
redirection × 1
uri × 1