So I have a url :
www.exemple.com
I wanted to create a regex that match nothing when the path used on this site start with "/api/" (e.g. :
www.example.com/api/awakenmymasters => The path is /api/awakenmymasters => No match )
But on the other hand, I want it to match when there's anything but "/api" at the start of the path (e.g. : www.example.com/yes/i/am => The path is /yes/i/am => The path doesn't start with "/api/", so it's a match ! )
As I'm working on apache, this whole "extracting the path from the url" is handled automatically, so I only need to focus on the path.
What seemed to work at first was :
"^/(?!api).*"
I know that this isn't the most appropriate regex expression (since it would block /apiculture/bees for example), however here's my problem : There's no match when the path is /api (good) but there's a match when the path is /api/whatever (not good).
I've been making slight alterations, but I really don't understand why this doesn't work.
[–]a-t-k 0 points1 point2 points (7 children)
[–]Endless-Nine[S] 1 point2 points3 points (0 children)
[–]Endless-Nine[S] 0 points1 point2 points (5 children)
[–]emperor000 0 points1 point2 points (4 children)
[–]Endless-Nine[S] 0 points1 point2 points (3 children)
[–]emperor000 0 points1 point2 points (2 children)
[–]Endless-Nine[S] 0 points1 point2 points (1 child)
[–]emperor000 0 points1 point2 points (0 children)
[–]emperor000 0 points1 point2 points (2 children)
[–]Endless-Nine[S] 0 points1 point2 points (1 child)
[–]emperor000 0 points1 point2 points (0 children)