I have written a simple rest api by PHP 5.6. Here is the skeleton.
project -> api -> index.php, controllers/, models/,
project -> docs -> ...
project -> src -> index.php, some directories
project is the document root directory. When i request with this url:
/api/pet/find
i want apache to not redirects this url to the 'find' directory. It works on my local system but not working on the test environment(ubuntu + apache2)
With above url i get
The requested URL /api/pet/find was not found on this server.
Note: src and api are totally different projects but i host them in same domain different paths. apache config:
DocumentRoot /var/www/html/admin/project DirectoryIndex index.html index.php <Directory "/api"> DirectoryIndex index.html DirectoryIndex index.php DirectoryIndexRedirect on </Directory>
That is it.