Quantcast
Viewing all articles
Browse latest Browse all 224

Redirection with exclusions RegEx

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)(.*)$ {return301 /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?

Viewing all articles
Browse latest Browse all 224

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>