Running WordPress web sites, some stand –alone others multi-site.
Goal: Any request for files in a folder directly by their URL be redirected to root or specified URL. If requests for those same files come from a link or a call via WordPress within the domain allow it.
Since WordPress uses rewrite rules in root, I am concerned that using rewrite rules in htaccess files in subfolders may cause issues with WordPress. Hence, my thought to redirect back to root thinking that the rewrite rules there will over ride previous rules from a subfolder. However, this may not be an issue since my goal is for requests that do not go through root, that is, through WordPress be redirected.
And, I’m really weak on htaccess use. I assume that an htaccess file in root can set up rules between the server and the visitor, and these are the rules to abide by while communicating with the server until another set of rules come into play via another htaccess file with new instructions or conditions. Then these new rules remain intact until changed once again. Is this assumption correct? Or does a new htaccess add to, rather than replace the previous set of rules?