Root-relative URL doesn't work locally
Posted: 22. May 2018 18:24
Hi,
A link like
The latter location is indeed not where the x-files folder is at (it is at C:\xampp\htdocs\www\Websites\NameOfWebsite\), but I would like to use the root-relative URL (the leading slash). Is there a XAMPP setting that I can change so that I can? Or does a newer XAMPP version solve this problem?
A link like
- Code: Select all
<script src="/x-files/pretext-script.js"></script>
- Code: Select all
Loading failed for the <script> with source “http://localhost/x-files/pretext-script.js”
The latter location is indeed not where the x-files folder is at (it is at C:\xampp\htdocs\www\Websites\NameOfWebsite\), but I would like to use the root-relative URL (the leading slash). Is there a XAMPP setting that I can change so that I can? Or does a newer XAMPP version solve this problem?