You can change Apaches httpd.conf by clicking (in xampp control panel) apache/conf/httpd.conf
and adjust the entries for DocumentRoot
and the corresponding Directory
entry.
Just Ctrl+F for “htdocs” and change the entries to your new path.
See screenshot:
#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "C:/xampp/htdocs"
<Directory "C:/xampp/htdocs">