How do I allow custom .php files to be accessable? I have already looked at the How do I call legacy PHP files? answers and they didn't fix my problem.

I have a custom php file in my Drupal site (Hosted on Acquia Cloud and I am working on a local version of the site using Acquia Dev Desktop) that needs to be accessable, I added these lines to my .htaccess file trying to allow access to the php file

RewriteCond %{REQUEST_URI} !^/learning/
RewriteCond %{REQUEST_URI} !^/learning/sales/[^/]*\.php$
RewriteCond %{REQUEST_URI} !^/learning/sales/index.php
RewriteCond %{REQUEST_URI} !^/learning/sales/ajax/[^/]*\.php$


But I still get this response trying to go to the index.php file.
"Forbidden
You don't have permission to access /learning/sales/ on this server."

How can I fix this?

Note: if I change the file to be index.html it works just fine (well my ajax call in it doesn't work but it atleast loads) but if it is index.php it returns with the 403 error.
This should do the trick:

 RewriteCond %{REQUEST_URI} !/learning/[^/]*\.php$


For more info please look at this thread, unable to run custom php script inside drupal.