Quantcast
Channel: JetBrains Developer Community : Thread List - IntelliJ IDEA Users
Viewing all articles
Browse latest Browse all 5661

HTML root-relative links

$
0
0

Hi,

 

When deploying HTML files with IntelliJ, is there a way to change the root directory?

The problem I'm having is that my project is deployed at localhost/Project-Name and using root-relative URLs links to localhost, rather than localhost/Project-Name.

 

For example:

I have an index.html that links to a stylesheet in stylesheets/styles.css using a root-relative URL (/stylesheets/styles.css). I get a 404 for this because it's checking localhost/stylesheets/styles.css, rather than localhost/Project/stylesheets/styles.css.

 

Everything works fine when I test it from my server, it's just local testing that is the issue.

 

tl;dr: is there a way to change web root from localhost/Project to just localhost?

 

Thanks.


Viewing all articles
Browse latest Browse all 5661

Trending Articles