I am configuring the templates with the allowedpaths property and i want the template to be allowed everywhere under content/www except for content/www/dir1 and content/www/dir2 paths. Please help in forming the regex. I tried the below combinations.
^(?!/content/www/dir1(/.*))/^(?!/content/www/dir2(/.*))
Solved! Go to Solution.
Views
Replies
Total Likes
This one just seems working fine.
^(?!/content/www/(dir1|dir2)(?:/|$))/content/www(/.*)?
Thanks for the direction though.
Views
Replies
Total Likes
Try the following regex pattern for this use case-
/content/www/(?!(dir1)|(dir2)).*
Views
Replies
Total Likes
Thanks for the reply but this doesn't allow me to create under /content/www however it restricts in content/www/dir1 and content/www/dir2
Views
Replies
Total Likes
This one just seems working fine.
^(?!/content/www/(dir1|dir2)(?:/|$))/content/www(/.*)?
Thanks for the direction though.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies