Let's say you have a website with incoming backlinks to example.com/page1/. However, you want to redirect this URL to a different URL - or to the homepage. This is important, both for real users and search engines. If a search engine comes across a dead link, you will forfeit all the incoming "link juice", which has a negative effect on your SEO. Dead links also create a bad user experience.
If this URL were a regular .html page, it would be easy to fix this in .htaccess. You could use add the line below, which redirects the URL to the home page:
Redirect 301 /page-with-backlinks.html /
However, this will not work for pretty links, which is why you then need to create a redirect match. Creating a redirectMatch can be a bit daunting for people with little experience of regex patterns (Regular Expressions). This is why we made an htaccess creator that does it for you. Of course, you can also use this pattern generator for other types of functions, that require you to create a regex match pattern for pretty URLs.