I'm having one of those "brain's gone for a walk" days
I'm looking at implementing a RESTful web service in which all requests are handled by a script or scripts at the root of the service, lets say this script is at: "mydomain/api/handler.php".
Now according to the principles of REST each part of the API has its own URL such as "mydomain/api/date/" which should be handled by the script.
Having searched the interweb I came across http://blog.teamlazerbeez.com/2010/05/25/serving-restful-urls-with-mod_rewrite/ which had the rule:
However it didn't work. RewriteRule is enabled and working in my .htaccess file. What am I doing wrong?
I'm looking at implementing a RESTful web service in which all requests are handled by a script or scripts at the root of the service, lets say this script is at: "mydomain/api/handler.php".
Now according to the principles of REST each part of the API has its own URL such as "mydomain/api/date/" which should be handled by the script.
Having searched the interweb I came across http://blog.teamlazerbeez.com/2010/05/25/serving-restful-urls-with-mod_rewrite/ which had the rule:
Code:
RewriteRule ^/api.*$ /api/handler.php [L]
However it didn't work. RewriteRule is enabled and working in my .htaccess file. What am I doing wrong?