My website project is based on MVC stratuctre so i have an url like [site]/admin/login or my url could be [site]/user/edit/[id] but in bootstrap we have css relative path like this:
<link href="libs/bootstrap/css/bootstrap.min.css" rel="stylesheet">
while my address is [site]/admin/login then [site]/admin/login/libs/bootstrap/css/bootstrap.min.css doesn't exists so i have to use absolute path to load css file likes:
...
<link href="http://example.com/libs/bootstrap/css/bootstrap.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="http://example.com/libs/jquery2.1.1/jquery-2.1.1.min.js"></script>
<script type="text/javascript" src="http://example.com/libs/bootstrap/js/bootstrap.min.js"></script>
...
but my problem is font's doesn't load when i use absolute css path for bootstrap.css you can see in this image when i use www. in url my page loads correctly and shows icon fonts:
but when i open url without www. the font doesn't load and icon doesn't show:
and i think it's because of css path without www is not equal font path with www . the url in image is real and you can test it yourself.is there any solution?