Redirection with exclusions RegEx
Regular Expressions
1
Posts
1
Posters
3
Views
1
Watching
-
I'm using the Redirection plugin by John Godley on our WordPress site, and I want to create a redirect rule that applies to multiple URLs, but also excludes 2 specific urls. With a little help from Google as well as ChatGPT, I found that the syntax that should work is as follows:
location ~ ^/group/(?!members-only|harp-for-the-lord)(.*)$ {
return 301 /courses/$1;
}However, apparently that code is supposed to be added to the NGINX configuration file, but I’ve never SSH’d into a server. So I thought I'd ask here in case anyone could help me set this up so I can get the same result using the Redirection plugin. Thoughts?