Apache 设置Zend骨架的重写规则
我使用opensuse 12.2操作系统、apache 2.2、zend framework 2。 为了拥有框架的框架应用程序,我在apache文件中设置了一个虚拟主机。 这里是定义Apache 设置Zend骨架的重写规则,apache,.htaccess,zend-framework2,virtualhost,opensuse,Apache,.htaccess,Zend Framework2,Virtualhost,Opensuse,我使用opensuse 12.2操作系统、apache 2.2、zend framework 2。 为了拥有框架的框架应用程序,我在apache文件中设置了一个虚拟主机。 这里是定义 <VirtualHost 127.0.0.1> DocumentRoot "/home/gabriele/Web/zf2-tutorial/public/" ServerName zf2-tutorial.localhost SetEnv APPLICAT
<VirtualHost 127.0.0.1>
DocumentRoot "/home/gabriele/Web/zf2-tutorial/public/"
ServerName zf2-tutorial.localhost
SetEnv APPLICATION_ENV "development"
<Directory "/home/gabriele/Web/zf2-tutorial/public/">
Options +FollowSymLinks
AllowOverride All
DirectoryIndex index.php
AllowOverride None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
如果我使用zf2-tutorial.localhost/test1234,我会看到一个在框架内重定向的错误,而不是一个正常的apache错误 对于初学者,您的VHOST设置不正确:
AllowOverride All
DirectoryIndex index.php
AllowOverride None # WRONG - remove this.
您已取消覆盖,这将终止您的htaccess。添加vhost后是否重新启动了apache?
AllowOverride All
DirectoryIndex index.php
AllowOverride None # WRONG - remove this.