jquery - Image and CSS links broken after URL redirection -


this directory structure of webapi asp .net project:

root   controllers   view     -js     -css     -images     -a.html 

my a.html contains links css, images - <img src="images\a.png" /> or <link herf="css/a.css"/>

i use url redirection paths "localhost/client" open a.html. links broken. ideal way solve this? first of why broken. mean css/a.css points localhost/client/css/a.css not found? not want hardcode links path relative new path mean links broken when open html browser? can use kind of variable in css , image paths make configurable?

try adding ~.

ex.

<img src="~/images/a.png" />  <link herf="~/css/a.css"/> 

Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -