I have some custom functions I hit in ajax requests that I put in custom/modules/modulename/mycustomfile.php. Something is amiss in one of my environments because these requests get bounced to the 403 page. The requests go through if I comment out this line in .htacess:
RedirectMatch 403 (?i)/+(soap|cache|xtemplate|data|examples|include|log4php|metadata|modules)/+.*\.(php|tpl)
I did some trial and error and moved a simple phpinfo() file through the directories and found:
custom/modules/modulename/phpinfo.php gets 403
custom/modules/phpinfo.php gets 403
custom/phpinfo.php works