yandeu / five-server-vscode

⚡ VSCode Extension for Five Server.
https://marketplace.visualstudio.com/items?itemName=yandeu.five-server
Other
120 stars 9 forks source link

Href's automatically going up the folder structure on live server #19

Open antonw51 opened 2 years ago

antonw51 commented 2 years ago

Describe the bug I have my file structure setup like pages/main/ index.html style.css ...

Although when I try to link my css using <link rel="stylesheet" href="style.css">

The live server ends up looking for the file one folder upwards

So it's looking for the style.css at page/

And throws a 404 error

This works perfectly when opening the html file itself but not on the live server. I've only changed the following settings:

yandeu commented 2 years ago

The root is different of you right-click a folder or a file. If you click "Open with Five Server (as root)", the selected folder becomes the root of the http server.

So I guess in your case, you have to right-click the "main" folder to open five server.

Redlips2012 commented 1 year ago

VS code i type some code in Terminal .js file and I got the same problem. However, write something in .html file and hit enter seem to solve the problem

yandeu commented 1 year ago

I have made significant changes last week.

The resolution path is different if you open /path, /path/ or /path/index.html.