楼上说的是对的,我把整个项目放到www目录里就没问题,但是用Alias指向工作空间里的项目就不行,谁知道怎么解决?html.conf 如下:Alias /html/ "E:/Program Files/Zend/Zend Studio for Eclipse - 6.0.0/workspace/Music/html/" <Directory "E:/Program Files/Zend/Zend Studio for Eclipse - 6.0.0/workspace/Music/html/"> Options Indexes FollowSymLinks AllowOverride all Order allow,deny Allow from all </Directory> httpd.conf 如下:... <Directory "F:/wamp/www/"> Options Indexes FollowSymLinks AllowOverride all Order Deny,Allow Deny from all Allow from 127.0.0.1</Directory> ... Include "F:/wamp/alias/*" ...
/**
* My new Zend Framework project
*
* @author
* @version
*/set_include_path('.' . PATH_SEPARATOR . '../library' . PATH_SEPARATOR . './application/default/models/' . PATH_SEPARATOR . get_include_path());
require_once 'Zend/Controller/Front.php';/**
* Setup controller
*/
$controller = Zend_Controller_Front::getInstance();
$controller->setControllerDirectory('../application/default/controllers');
$controller->throwExceptions(false); // should be turned on in development time
// run!
$controller->dispatch();
.htaccess 如下:RewriteEngine onRewriteRule !\.(js|ico|gif|jpg|png|css)$ index.php
这时候就可以根据需要 处理不同的路径
Options Indexes FollowSymLinks
AllowOverride all
Order allow,deny
Allow from all
</Directory>
httpd.conf 如下:...
<Directory "F:/wamp/www/"> Options Indexes FollowSymLinks
AllowOverride all
Order Deny,Allow
Deny from all
Allow from 127.0.0.1</Directory>
...
Include "F:/wamp/alias/*"
...