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

Placeholder Image
Clear Cache After Activate/Deactivate a Plugin

When you activate or deactivate a plugin, you might ask for the entire cache to be cleared.

Automatic Cache
Automatic Cache

The cache is created in two ways. First, it is created when the page is visited. Second, If enabled, it…

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…

Ready to get started?

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