Regex Symbol Cheat Sheet
^ Matches the start of the URL.
$ Matches the end of the URL.
. Matches any single character.
* Matches zero or more of the previous item.
( ) Creates a Capture Group (stored as $1).
/ A literal forward slash in your path.
Scenario: Migrating /news/ to /blog/
If you are changing your site structure from /news/post-name to /blog/post-name and want to move everything at once, use this setup:
Pattern: ^/news/(.*)
Substitution: /blog/$1
The (.*) captures the unique post name, and $1 puts it back at the end of the new /blog/ path.
Redirect Strategy FAQ
What is Regex (Regular Expressions)?
Regex is a standardized language used for pattern matching in text. In Technical SEO, we use it to write a single "Global Rule" that can handle thousands of redirects at once, rather than listing them one by one in a spreadsheet.
Is Regex case-sensitive?
By default, yes. However, most servers (like Apache or Nginx) allow you to add a flag (like [NC]) to make it case-insensitive. This tool uses standard JavaScript logic, which is usually case-sensitive.
Why is my Regex redirect not working on my server?
Check your "Server Flavor." Apache (.htaccess), Nginx, and Cloudflare all use slightly different versions of Regex. Always double-check your server documentation after testing your logic here.