I'm creating a API for a specific part of my webapplication. The API is located in the subfolder API. See the folder structure below:
- API
- cars
- index.php
- count.php
However, now the tricky part. Customers will be requesting endpoints that end with JSON:
cars.json => cars/index.php cars/count.json => cars/count.php
I'm not an expert in rewrites. But is this possible?