Using Regular Expression to Exclude a Page

Using Regular Expression to Exclude a Page

by admin

A regular expression is a string of text that allows you to create patterns to find what you’re looking for in a text.

If the existing exclusion methods don’t work for you, you can exclude pages using Regular Expression. We find it appropriate to explain it through an example to give you an idea.

Sample #1

\/category\/([^\/]+)\/amp\/

https://www.wpfastestcache.com/author/shiona-mccallum/amp/
https://www.wpfastestcache.com/tag/north-america/amp/
https://www.wpfastestcache.com/category/news/amp/

Related articles

Cache Url with Google Analytics Parameters QueryString
Cache Url with Google Analytics Parameters QueryString

If a url contains a query string, the url is not cached but the situation is different for the urls…

Exclude Page
Exclude Page

Although WP Fastest Cache works flawlessly, sometimes optimizing pages can cause errors. In this case, instead of disabling the plugin…

Ready to get started?

Purchase your first license and see why 1,500,000+ websites globally around the world trust us.