I am working on a client website that runs on Processwire. I am trying to set up a regular ol' PHP page outside of any processwire stuff that can just execute like a normal PHP page being served up.
Let's assume I am trying to set up "/foo/bar.php" at root where the page "bar.php" has this code:
foo/bar.php
<?php
echo "Hello World";
?>
Presumably, if I visited example.com/foo/bar.php the server would see that that resource exists and serve up the content by showing the user "Hello World" in the browser. Instead, however, I get a 404 error that takes me to the PW 404 page.
Within the root's .htaccess file I see this:
# -----------------------------------------------------------------------------------------------
# 17. If the request is for a file or directory that physically exists on the server,
# then don't give control to ProcessWire, and instead load the file
# -----------------------------------------------------------------------------------------------
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !(favicon\.ico|robots\.txt)
I must not understand this correctly since the actual bar.php file does physically exist... yet it won't work. If, however, I change the extension of bar.php to bar.txt the file does load at example.com/foo/bar.txt (displaying the PHP code shown above).
So, how can I adjust or update .htaccess to tell PW to ignore anything under /foo (including files and folders recursively) from being processed by PW?