I currently have an htaccess file on my root dir. I created a NEW htaccess file inside of callbacks/api and entered this:
RewriteEngine on
RewriteBase /callbacks/api
RewriteRule ^(.*)\.(json|xml|csv|txt|printr)$ ./endpoint.php?api_request=$1&api_response_type=$2
I am following the same rewrite rules that I have in my other htaccess (that work just fine). However in this instance I pass the following URL:
domain.com/callbacks/api/v1/test_rest.xml
Inside of my endpoint.php file I have:
<?
//just making sure the 500 is not due to php
//so lets just dump the GET's
var_dump($_GET);
?>
Am i missing a flag required at the end of my rewrite rule?
Try this:
I did not test the rule, just added 2 lines to prevent loops.