htaccess抛出403禁止

htaccess抛出403禁止

本文介绍了的.htaccess抛出403禁止/ Zend框架的快速启动项目创建(的Mac OS X 10.6.5)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想获得Zend框架的快速入门教程启动和运行,但我碰到的.htaccess问题。看来如果我删除.htaccess文件,项目运行良好,但如果我离开它在那里,它抛出一个403禁止。 htaccess的是Zend框架控制台命令生成的默认文件。这里是htaccess的:

  RewriteEngine叙述上
的RewriteCond%{} REQUEST_FILENAME -s [OR]
的RewriteCond%{} REQUEST_FILENAME -l [OR]
的RewriteCond%{} REQUEST_FILENAME -d
。重写规则^ * $  -  [NC,L]
重写规则^ * $的index.php [NC,L]
 

这是在Mac OS X 10.6.5

mod_rewrite的是AllowOveride全部

下面是我的虚拟主机信息

 <虚拟主机*:80>
     服务器名zf_cms.local
     的DocumentRoot /用户/ kjye /网站/ zf_cms /公
     SETENV APPLICATION_ENV发展
     <目录/用户/ kjye /网站/ zf_cms /公共及GT;
          选项​​+指标+的FollowSymLinks + ExecCGI
          的DirectoryIndex index.php文件
          设置AllowOverride所有
          订购允许,拒绝
          所有允许
     < /目录>
< /虚拟主机>
 

我通过添加选项+指标+的FollowSymLinks + ExecCGI感谢收看固定它。

解决方案

 <虚拟主机*:80>
 服务器名zf_cms.local
 的DocumentRoot /用户/ kjye /网站/ zf_cms /公
 SETENV APPLICATION_ENV发展
 <目录/用户/ kjye /网站/ zf_cms /公共及GT;
      选项​​+指标+的FollowSymLinks + ExecCGI
      的DirectoryIndex index.php文件
      设置AllowOverride所有
      订购允许,拒绝
      所有允许
 < /目录>
 

这证明在Mac OS工作。感谢所有帮助和评论。

I am trying to get Zend Framework's quickstart tutorial up and running, but i ran into .htaccess issue. It seems if i remove the .htaccess file, the project runs fine, but if i leave it in there it throws a 403 Forbidden. The .htaccess is the default file generated by Zend Framework console command. Here is the .htaccess:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]

This is under Mac OS X 10.6.5

mod_rewrite is onAllowOveride All

Here is my virtual host info

<VirtualHost *:80>
     ServerName zf_cms.local
     DocumentRoot /Users/kjye/Sites/zf_cms/public
     SetEnv APPLICATION_ENV "development"
     <Directory /Users/kjye/Sites/zf_cms/public>
          Options +Indexes +FollowSymLinks +ExecCGI
          DirectoryIndex index.php
          AllowOverride All
          Order allow,deny
          Allow from all
     </Directory>
</VirtualHost>

I fixed it by adding "Options +Indexes +FollowSymLinks +ExecCGI" Thanks for viewing.

解决方案
<VirtualHost *:80>
 ServerName zf_cms.local
 DocumentRoot /Users/kjye/Sites/zf_cms/public
 SetEnv APPLICATION_ENV "development"
 <Directory /Users/kjye/Sites/zf_cms/public>
      Options +Indexes +FollowSymLinks +ExecCGI
      DirectoryIndex index.php
      AllowOverride All
      Order allow,deny
      Allow from all
 </Directory>

This turns out to work under mac os. thanks for all the help and comment.

这篇关于的.htaccess抛出403禁止/ Zend框架的快速启动项目创建(的Mac OS X 10.6.5)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-31 06:05