|
|||
|
I'm experimenting with Zend Framework. I have several site on my test server (Apache2, php5, MySQL5, Windows XP). Before I just put everyting in different folders. Ex. htdoc/site1, htdoc/site2
For the Zend project I made a fake domain. Here is how I did it: Code:
<VirtualHost *:80> ServerName phpweb20 DocumentRoot "C:\Apache2.0\Apache2\htdocs\phpweb20" <Directory "C:\Apache2.0\Apache2\htdocs\phpweb20"> AllowOverride All Options All </Directory> php_value magic_quotes_gpc off php_value register_globals off </VirtualHost> Code:
127.0.0.1 localhost 127.0.0.1 phpweb20 Currently my other site give a Zend error. Ex. http://localhost/site2 is now looking for Site2Controller. |
|
|||
|
I think I have it figured out. there is a good explanation here: Setting Up A Virtual Host in Apache
This only answers half my question though. I'm currently using a forum in one of my site. I have plans for two other sites that will also have forums. So far, i like this particular forum (Simple Machines Forum) however, it is procedural and all fits in a sub folder. Question: Won't Zend Framework thing that domanName.com/forum is trying to reach a controller directory? Is there a way to have such a forum system implemented along side a site on Zend Framework? Certainly, the reason for Zend Framework is to implement things such a forums in a site. If I were 20 times more competent at this stuff I'd think about writing one. But until then an open source forum like SMF is pretty handy and secure. Any suggestions? This forum is a vBulletin but it's on a separate URL from everything else... Last edited by horseatingweeds : 04-27-2008 at 07:11 AM. |
|
||||
|
This is all due to your .htaccess files and RewriteEngine rules.
In any subfolder of the site you DO NOT want to get redirected back to the bootstrap (index.php) and thus pushed through the MVC you need a new .htaccess with the following: Code:
RewriteEngine Off As for the sites you have living under the web root htdocs/site1, htdocs/site2, etc. you need to set the Base Path for the RewriteEngine so its looking in the correct location. For more details and help with mod_rewrite check out the Apache Docs
__________________
Zend Framework Resources: Zend Webinars | Reference Manual | API Docs | Books | FreeNode: #zftalk Getting Started Tutorials: Getting started with ZF | Getting started with Zend Auth |
![]() |
| Thread Tools | |
| Display Modes | |
|
|