Hi i'm trying to create a REST API method in core php
I created a controller class and method class to call my function as per the reference
http://phppot.com/php/php-restful-web-service/
I have my files in sub-folder in my server where i'm currently creating this i face issue on accessing rewrite URL , how can u solve this issue below is the htaccess rule which i tried.
RewriteEngine on
RewriteBase /test/rest/
# map neat URL to internal URL
RewriteRule ^/test/rest/mobile/list/$ /test/rest/RestController.php?view=all [nc,qsa]
RewriteRule ^/test/rest/mobile/list/([0-9]+)/$ /test/rest/RestController.php?view=single&id=$1 [nc,qsa]
See Question&Answers more detail:os