Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: Multi VHost / single file |
|
Author |
|
flouck
Joined: 03 Feb 2015 Posts: 1 Location: Hong Kong
|
Posted: Fri 20 Mar '15 4:18 Post subject: Multi VHost / single file |
|
|
Hi everybody,
I'm actually working on a project in wich one I use Zend Framework 2.
In this project I have 4 websites. (this is require, I don't want to change it).
I have 1 Virtual Host for each website:
- com-mywebsite.com
- cp-mywebsite.com
- pos-mywebsite.com
- ap-mywebsite.com
Each Virtual Host redirect to the same folder and same file because everything is in the same project so same entry point (same index.php)
actually if I type each url in a browser, they all redirect to the same part of my project so I added some routes in ZF2 to access to one website and not another :
- com-mywebsite.com/com
- cp-mywebsite.com/cp
- pos-mywebsite.com/pos
- ap-mywebsite.com/ap
This is a quick and dirty fix because I also can access to the ap website with this url : com-mywebsite.com/ap
I'd like every website to be accessed from their root:
- com-mywebsite.com
- cp-mywebsite.com
- pos-mywebsite.com
- ap-mywebsite.com
and I don't want to display /something after it to access to the website even if after you can access to some other pages of each website.
I'm sure there is a way to fix it but I don't know how.
Can you help me on it please.
Thanks. |
|
Back to top |
|
AdrianK_IT
Joined: 30 May 2013 Posts: 34 Location: Scottish Borders, UK
|
Posted: Fri 27 Mar '15 20:55 Post subject: |
|
|
I don't understand your problem at all. What are you trying to do?
You say all virtual hosts "redirect to the same folder", then wonder why if you type those URLs into a browser, you end up in same place.
Have you tried redirecting the virtual hosts to different folders? That's what virtual hosts are for!
Or have I completely missed the point? Please explain further. |
|
Back to top |
|
|
|
|
|
|