how to create virtual host in xampp?
create virtual host in xampp
free and open source cross-platform web server solution. Xampp containing PHP, MYSQL etc.Xampp is
Benefits of creating virtual host is you can easily make make urls clean and many more.
1. First you need to add the following code in C:/xampp/apache/config/extra/httpd-vhosts.config file: <VirtualHost 127.0.0.2:80> DocumentRoot "C:/xampp/htdocs/therichpost" ServerName therichpost.localhost </Directory> </VirtualHost> 2. After it your need to add the below code in C:\Windows\System32\drivers\etc\hosts file: 127.0.0.2 therichpost.localhost #change to match your Virtual Host. 3. After this restrat your xampp server and you can open your website with "therichpost.localhost" link. Now you can open your localhost like: First before applying virtual host: localhost/therichpost After applying virtual host: therichpost.localhost
There are so many code tricks in Xampp and i will let you know all. Please do comment if you any query related to this post. Thank you. Therichpost.com