My contact form is at the URI /contact-me (which means the page file is at /user/pages/03.contact-me/contact.md and the template is at /user/themes/br/templates/contact.html.twig).
I want to point the form action to /user/themes/br/php/mandrill_send.php but when I put that in the action field I end up at http://user/themes/br/php/mandrill_send.php which doesn’t seem to be recognized as a page. It’s certainly not a page as in /user/pages/.
How do I point to that action script in Grav? That is, how do I resolve Grav’s routing structure to end up in the right place for the form action?
True, by default we are blocking access to PHP in the user folder for security reasons. You would have to remove |useror|php in this line of the .htaccess file.
# Block access to specific file types for these folders
RewriteRule ^(system|user|vendor)/(.*)\.(txt|md|html|yaml|php|twig|sh|bat)$ error [L]
maybe create a folder at the root of your Grav installation, like /mandrill ? You would have to use {{ base_url_relative }}/mandrill/blahblah.php for your path though.