I have following directory structure
MyWebsite
Frontend
Backend
Where MyWebsite
is a root folder. Frontend
is the files for the website whereas Backend
is for the admin panel.
I want to setup a virtual host in such a way that
When user types http://www.mywebsite.com
, it will be pointed to Frontend
folder
And when user types http://www.mywebsite.com/backend
, it will be pointed to Backend
Folder
As Frontend and Backend folder is in same level under root diretory, i can only make work one at a time (either Front end or Backend) but not both. How can it be done?
Here is my Virtual host so far
<VirtualHost *:80>
DocumentRoot "D:/server/www/MyWebsite/Frontend"
ServerName www.mywebsite.com
ServerAlias mywebsite.com
</VirtualHost>
Thanks
Nevermind, I used
htaccess
to handle the situation and leaving the virtual host setting as it is. Below is the code