How to solve net::ERR_ABORTED 403 (Forbidden) for leaflet.css and leaflet.js

Viewed 543

I have created a project which is working fine when I open it with VSCode live server (127.0.0.1:5501/index.html). enter image description here

The following is the image of the scripts in the index.html, and the files path. enter image description here

The css file for leaflet.css located in the head of index.html looks like this:

<link rel="stylesheet" href="vendors/leaflet/leaflet.css">

I'm currently using XAMPP to run my app and the project is located in the htdocs. Whenever I run the code with XAMPP, I get the following: enter image description here

So, the map is not showing. The errors show up:

GET http://localhost/project1/vendors/leaflet/leaflet.css net::ERR_ABORTED 403 (Forbidden)

GET http://localhost/project1/vendors/leaflet/leaflet.js net::ERR_ABORTED 403 (Forbidden)

I would appreciate any help.

0 Answers
Related