I would like to restrict access to my site using a custom URI regular expression.
I would like to allow access for such URIs:
https://example.com/item/page/2/?wpv_view_count=258
https://example.com/item/page/3/?wpv_view_count=258
and restrict content for such URIs:
https://example.com/item/snv00001-indice-di-documenti/
https://example.com/item/sa00068-libro/
https://example.com/item/aud00068-audio/
I need to provide the restrict content URI regex
Based on the info in the question you want to match everything except requests which start with
/item/page/so:That is:
A negative lookahead is a zero-length match - so the next bit of the regex
.+continues right after/item/.Here's a demonstration: https://regex101.com/r/8T2ytg/1