Obviously! we can point apache server to pick our code files from another location other then www or htdocs. Also we can configure the url for our project folder.
Lets take a look how.
Step 1. Look for the file httpd.conf (this can be found under your apache installation folder inside conf directory)
Step 2. Open httpd.conf with your favorite editor.
Step 3. Look for the line
DocumentRoot "C:/xampp/htdocs" <Directory "C:/xampp/htdocs">
Step 4. After this tag insert your own Document and Directory.
DocumentRoot "E:/work/myproject" <Directory "E:/work/myproject"> Options Indexes FollowSymLinks Includes ExecCGI AllowOverride All Require all granted </Directory>
Step 5. Look for another line
Insert your own alias after closing the above tag.
<IfModule alias_module> Alias /myproject E:/work/myproject </IfModule>
Where Alias has two parameter 1. one is your url after localhost 2. your project folder path.
You can access your
E:/work/myproject project at URL
Let me know your feedback guys!!!