By default Each of project located in www htdocs folder directory are accessed by http://localhost/projectname so we want to change it http://projectname.local or whatever local domain you want, I have my site project http://localhost/sdtuts and I want to access it as http://sdtuts.local/.
Open apache httd.conf in xampp
Open #xampp click on Apache’s config button and click on httpd.conf

Open apache httd.conf in xampp
Write the following code at the end of file.
<VirtualHost *:80> DocumentRoot "D:/xampp/htdocs/" ServerName localhost </VirtualHost> <VirtualHost *:80> DocumentRoot "D:/xampp/htdocs/sdtuts" ServerName sdtuts.local <Directory "D:/xampp/htdocs/sdtuts"> Require all granted </Directory> </VirtualHost>
Setup it on hosts file
To to C:\Windows\System32\drivers\etc and open “host” file with notepad++ or another editor tool and add the following line at the end of file and save it.

Setup it on hosts file
127.0.0.1 sdtuts.local
and finally access it with local address http://sdtuts.local/