現在、ルートディレクトリにhtaccessファイルがあります。callbacks / api内に新しいhtaccessファイルを作成し、次のように入力しました。
RewriteEngine on
RewriteBase /callbacks/api
RewriteRule ^(.*)\.(json|xml|csv|txt|printr)$ ./endpoint.php?api_request=$1&api_response_type=$2
私は他のhtaccessと同じ書き換えルールに従っています(これは問題なく機能します)。ただし、この場合、次のURLを渡します。
domain.com/callbacks/api/v1/test_rest.xml
私のendpoint.phpファイルの中に:
<?
//just making sure the 500 is not due to php
//so lets just dump the GET's
var_dump($_GET);
?>
書き換えルールの最後に必要なフラグがありませんか?