xoail
xoail

Reputation: 3064

RegEx URL Match - Everything but

What should be my regex if I want to block everything (/*) except the folder path (ex: /folder-name)? The folder has other files too that need to be allowed.

Upvotes: 0

Views: 444

Answers (1)

eugene_che
eugene_che

Reputation: 1997

Try this one

^/(?!folder-name(/|$)).*$

I believe, it matches everything except /folder-name dir.

Upvotes: 2

Related Questions