T
T
toha_man2018-04-19 12:04:38
Apache HTTP Server
toha_man, 2018-04-19 12:04:38

How to setup site root in XAMPP?

The latest version of XAMPP is installed. I put it in the htdocs / [my site] folder. But absolute links from the root of the site do not work

<a href="/index.html">ссылка</a>
<img src="/img/big/1.png">

In the settings did not touch anything, did not change. How to make access by absolute path to the site?
What other alternative is there for XAMPP to use to develop a site on localhost?
Same with Denver...

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Moris Haos, 2018-04-20
@morihaos

Hi
Root is htdocs. If a site is thrown into htdocs in the form of a directory, for example, mywww, then absolute links in the code must be written:
If you need it to be:
then you need to change the apache config.
With alternatives in Yandex, there are several ...
Denver has not been updated for a long time, so you can forget about it.

G
gribbber, 2021-05-11
@gribbber

In fact, it is very simple, there are many solutions to this problem. In my opinion, the easiest way is as follows: specify the path to the file relative to the root directory:
You can read more here if something is not clear: https://sibsisadmin.ru/xampp-kak-izmenit-kornevuyu...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question