How run a non-WordPress PHP Program on a WordPress site?

by NealWalters   Last Updated November 14, 2017 18:08 PM

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]

# END WordPress
Tags : php

Related Questions