I am trying to create an extremely simple RESTful test setup for the application I'm working on. I am using .htaccess to redirect URLs to my script controller, where I will parse the URLs to handle the logic.
I have a redirect job, but the problem is that if I do POST / PUT / DELETE, Firebug correctly shows my requests to the test station, but I get a 301 redirect response and then a second GET response.
How can I use htaccess to redirect url without sending 301 to browser?
This is the .htaccess I'm using now:
RewriteEngine On
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1
Geuis source
share