I'm developing a PHP RESTful server for an API locally on my mac.
I've managed to enable mod_rewrite and have Overrides allowed for the site directory (~/Sites/api).
In ~/Sites/api is the .htaccess file and index.php. I'd like to rewrite all requests to http://localhost/~myusername/api/* to index.php. I need to preserve the query parameters, but that's it.
I've tried the following in the .htaccess file:
Options +FollowSymLinks
RewriteEngine On
RewriteRule (.*) index.php [QSA,NC,L]
This gives a 500:Internal Server Error.
Commenting out the FollowSymLinks line gives a 403:Forbidden error.
I can access index.php fine without the rewrites in place.
Any help you could offer would be much appreciated. I feel like weeping at the moment.
Thanks, Ross