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

Clear Cache of Specific URLs when Updating or Posting
Clear Cache of Specific URLs when Updating or Posting

If all cache is not cleared when a post or a page is updated, this feature may be useful for…

Placeholder Image
Clearing Cache After New Post

When a new post is published, you can clear all cache or the cache of homepage, the cache of the…

Placeholder Image
Cache Trailing Non-Trailing Solution

The cache plugins save the output as a static html file and the visitors see the cached version.

Ready to get started?

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