This is my question, I have the following structure:
root/index.html root/api/index.php
I have coded using the built in php server so when I run php -S localhost:3000 everything runs smoothly but when I upload it to my vps or run it using apache in my local machine When my backend is not initialized, even Postman can access my endpoint.
I know maybe the configuration on htaccess can solve it, but I don't know how to do it, the whole scenario:
I visit my root directory (http://localhost:3000) to load my index.html On javascript it sends the request to http://localhost:3000/api/uri When my server runs on the built-in server, it gets all the data from the backend and returns it to my frontend perfectly
thanks for your help
I just added the .htaccess from lavarel e and everything works fine, it looks like there is a problem reading the route system I created.