php - how to redirect to a folder in public_html in Centos Apache Server?
I want to redirect to a folder based to the requested uri [sub-domain].
Let suppose I Have public_html as my root folder, in which I have some projects, Now I want to create something that allows me to point to the project folder based on the requested URL.
Like in Public_HTMl i have:
project1 project2 project3 project4
Now if my subdomain is project1.example.com,
then my root should be project1 folder, if the URL is project1 then my root will be project2.
How do I do this? I think virtual hosts can help me but how to use it?