Create a project outside the localhost directory and utilize your custom alias in PHP using XAMPP

This tutorial guides you through running a PHP project on XAMPP without the need to place the project files directly in the localhost's htdocs folder.


1.Open Xampp Control Panel


2.Right-click the Apache Config button and choose 'httpd-xampp.conf'




3.Scroll to the bottom of the file.



4.Add this code; the alias can change based on your preference, and the path is the specified path.


    Alias /basicv2 "C:/xampp/htdocs/basicv2/basic/web"

            <Directory "C:/xampp/htdocs/basicv2/basic/web">

                Options Indexes FollowSymLinks Includes ExecCGI

                AllowOverride All

                Require all granted

                #Options FollowSymLinks

                #Order allow,deny

                #Allow from all

            </Directory>


5.Close XAMPP, reopen it, and then try running the port using localhost/basicv2.


This is how to create a project outside localhost and use your own alias

Comments

Popular posts from this blog

What is AI, and how can we use it to enhance our business or job?

Remove Background with GIMP