I want to make pretty URLs in this format www.example.com/countryId/stateid but I want my API end-point to route to index.php in /public folder.
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule ^ index.php [L]
I keep getting 404 error and I don't know where am getting it wrong. This is my URL "http://localhost/location/src/public/countryId/stateId" and I want the URL endpoint to route to http://localhost/location/src/public/index.php. The .htaccess file exists in public/.htaccess where index.php is