I have a question similar to this one:
I have created a small PHP program that I want to call as a rest web service to return some data from custom MySQL tables.
I can put it anywhere, but I've tried the root folder (public_html), a folder I creatd called custom, and the cgi-bin folder.
For the first two, I get 404 not found. For the CGI-BIN it looks like it redirects to my home page.
I've set it with CHMOD to 755 (and the custom folder as well).
My .htaccess looks like this. I think maybe it needs to change somehow?
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
$wpdb
calls to fetch the data? I'm not sure what WP knowledge could be helpful here, this looks like a generic hosting issue that requires Apache htaccess knowledge