I've created a folder api/ in my www/html folder.. I've put a .htaccess file in there that looks like this
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule api/(.*)$ api/api.php?request=$1 [QSA,NC,L]
</IfModule>
In the api/ folder I have the api.php file with this code for testing;
<?php
echo $_REQUEST['request'];
?>
If I go to myserver/api/test I get a 404 not found.. So in this case I would thing it should echo test?
I've also tried putting the file in the www/html file instead of inside the api folder since I specify the api folder in the .htaccess file..