I wrote a simple rest api few weeks ago, this api working good into my webserver (bitnami - localhost), and also to my pay hosting. Now I setup a webserver with the raspberry, I'm a linux newbie and I bought a raspberry for learn. Anyway, the webserver working perfectly but when I have uploaded my rest api I got:
The request Url /project/api/v1/user/getUsers was not found on this server
Apache/2.4.10 (Raspbian) Server at webserver Port 80
in this way I perform the request:
http://webserver/project/api/v1/user/getUsers
now this api shunk the request from index.php that load the properly php file by a router, in this case user.php -> getUsers (function)
this roles is available in the .htaccess that have this content:
RewriteEngine On
#basic roles
RewriteBase /api/v1/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
#Shunk request on index.php
RewriteRule ^(.+)$ index.php?uri=$1 [QSA,L]
now I guess that my webserver have a problem with this .htaccess, 'cause if I type this url:
http://webserver/project/api/v1/
I can see correctly the index.php response of:
Invalid Request
from my own rest api
any idea about this? Thanks.
Update
seems that the .htaccess is readed correctly but cannot found the index.php page, strange.