Is there a way to show firwall Legacy Captcha for

I have this site : https://example.com and i have files only in the root folder which contains files that end with .html, .css and .js files. Is there a way to show block page for all other folders? I only want to allow the files which are on the root folder.

But you’d also want not to block URL-s like example.com/some-page/, example.com/contact-page/ at the same time?

that’s not problem even if it get shows captcha, but do not show captcha for example.com and the files which are of .js , .css , .html in the root folder. but all others should show captcha.