Title: Exclude rule syntax
Last modified: October 11, 2019

---

# Exclude rule syntax

 *  Resolved [ntamu](https://wordpress.org/support/users/ntamu/)
 * (@ntamu)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/exclude-rule-syntax/)
 * Hi!
 * Our site has URIs like this:
 * a) site.com/product-category/category-name/etc/
    b) site.com/product/random-product-
   name/
 * We need a rule to exclude URIs contains /product/ only but any rules I have tried
   to create affect both a and b variants.
 * For example:
    “Contains: product” – I know, this one definitely affect both variants.
   And when I tried to create a rule “Contains: product/”, the plugin removed the
   slash at the end.
 * Is it a bug or I should use some syntax to create a correct rule?
 * ——
    Wordpress and all plugins including WP Fastest Cache plugin are up to date.
    -  This topic was modified 6 years, 8 months ago by [ntamu](https://wordpress.org/support/users/ntamu/).

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [Emre Vona](https://wordpress.org/support/users/emrevona/)
 * (@emrevona)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/exclude-rule-syntax/#post-12024161)
 * I know this issue but I have no idea about the solution which does not confuse
   the users.
 *  Thread Starter [ntamu](https://wordpress.org/support/users/ntamu/)
 * (@ntamu)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/exclude-rule-syntax/#post-12024953)
 * If it’s something about making some changes in .htaccess or any other file directly,
   I could try.
    -  This reply was modified 6 years, 8 months ago by [ntamu](https://wordpress.org/support/users/ntamu/).
 *  Plugin Author [Emre Vona](https://wordpress.org/support/users/emrevona/)
 * (@emrevona)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/exclude-rule-syntax/#post-12025041)
 * no, it is not related with htaccess.
 * You can paste the following code into the header.php of theme file.
 *     ```
       if(preg_match("/\/product\//i", $_SERVER['REQUEST_URI'])){
            echo "[wpfcNOT]";
       }
       ```
   
 * Pleae don’t forge the clear all cache after adding the code.
    -  This reply was modified 6 years, 8 months ago by [Emre Vona](https://wordpress.org/support/users/emrevona/).
 *  Thread Starter [ntamu](https://wordpress.org/support/users/ntamu/)
 * (@ntamu)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/exclude-rule-syntax/#post-12025597)
 * It works!
    Thanks a lot!
 *  Plugin Author [Emre Vona](https://wordpress.org/support/users/emrevona/)
 * (@emrevona)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/exclude-rule-syntax/#post-12025686)
 * you are welcome 🙂 if you vote, you make me so happy. 
    [https://wordpress.org/support/plugin/wp-fastest-cache/reviews/?rate=5#new-post](https://wordpress.org/support/plugin/wp-fastest-cache/reviews/?rate=5#new-post)

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Exclude rule syntax’ is closed to new replies.

 * ![](https://ps.w.org/wp-fastest-cache/assets/icon-256x256.png?rev=2064586)
 * [WP Fastest Cache - WordPress Cache Plugin](https://wordpress.org/plugins/wp-fastest-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-fastest-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-fastest-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-fastest-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-fastest-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-fastest-cache/reviews/)

## Tags

 * [slash](https://wordpress.org/support/topic-tag/slash/)

 * 5 replies
 * 2 participants
 * Last reply from: [Emre Vona](https://wordpress.org/support/users/emrevona/)
 * Last activity: [6 years, 7 months ago](https://wordpress.org/support/topic/exclude-rule-syntax/#post-12025686)
 * Status: resolved