Redirection Plugin
This article explains how the Redirection plugin matches URLs and handles redirects in Frame. It covers the key components of a URL, such as protocol, domain, path, and query parameters, and walks through the available options for customizing how redirects are set up, including regular expressions, ignoring case and trailing slashes, and managing query parameters.
Updated 2 weeks ago
At the core of the Redirection plugin is its ability to match a specific URL and take an action based on it.
A typical URL might look like this:
https://mysite.org/articles/read-more?ref=homepage
This URL is made up of several components:
Protocol – http
or https
Domain – mysite.org
Path – /articles/read-more
Query parameters – ?ref=homepage
Redirection usually matches URLs based on the domain where WordPress is installed. Because of this, you don’t need to include the protocol (http
or https
) or the domain when setting up a redirect.
If you’ve connected additional domains to your WordPress site, you can use a server-level redirect to handle those.
The path is the most important part for WordPress content and always begins with a /
. For example, if you want to redirect traffic from https://mysite.org/old-page
, then the source path should simply be /old-page
.
When setting up redirects, you can define extra options either during setup or using default settings.
Redirection allows you to control how URLs are matched using several settings:
Regex – Use regular expressions for advanced matching patterns.
Ignore trailing slashes – Treat /articles/read-more/
and /articles/read-more
as the same URL.
Ignore case – Match /ARTICLES/READ-MORE
with /articles/read-more
.
These defaults can be set globally from the plugin’s Options page.
If your URL includes query parameters, like:
/articles/read-more?ref=homepage
Redirection will still match the URL even if the parameters appear in a different order—for instance, ?ref=homepage&source=footer
would still work.
To make this more flexible, you can also use regular expressions to capture variable query values.
You can choose how Redirection handles these parameters:
Exact match – This default setting matches URLs only if all query parameters match exactly.
Ignore all parameters – Matches the base path (/articles/read-more
) regardless of any added query parameters.
Ignore and pass parameters to target – Any query string will be passed along to the target URL. For example, if someone visits/articles/read-more?ref=homepage
, and your redirect points to /new-article
, they will be redirected to:
/new-article?ref=homepage