How to configure apache to load index.html and index.php?
P粉194919082
P粉194919082 2024-04-05 09:27:53
0
1
3672

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

P粉194919082
P粉194919082

reply all(1)
P粉596161915

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.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template