If you do not want to spoil the src attributes on your website, you can consider changing the configuration directives.
You can move it by editing the DocumentRoot
parameter in C:\xampp\apache\conf\httpd.conf
.
Currently, it should be installed as:
C:/xampp/htdocs
Change it to:
C:/xampp/htdocs/exampleSite
and your relative link as <img src="/images/sidenav/analysis-2.gif" />
should work fine.
Note:
- Remember to restart the XAMPP server after making the changes.
- After these changes, the lead
/
will always be directed to the exampleSite
folder. If you decide to change the root later, repeat the process for the root folder of your choice.
source share