zend框架工作索引动作给404

时间:2013-04-01 07:13:12

标签: php apache .htaccess zend-framework mod-rewrite

我今天遇到了一个奇怪的问题我试图通过google到目前为止没有运气来修复它。

问题是我在zend框架应用程序中有一个IndexController.php文件,它有一个简单的操作,当我试图通过

访问它时

http://mysite/index/about它会给我404

如果尝试

http://mysite/Index/about它会正确加载(使用Capital I)这个例外问题只给索引控制器我的其他控制器在ubuntu上工作得很好

这里是我的htaccess文件,我启用了mod_rewirte,并且allowe_overried已设置为全部

# Rewrite Rules for Zend Framework
RewriteEngine On
# Add File Names or Extentions of files that you want to be able to access
#RewriteRule !alternate.php|.(js|css|ico|bmp|gif|jpg|png|xml|xsl|eot|svg|ttf|woff)$ index.php
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]

# Security: Do not allow Browsing of Directories
Options -Indexes

# additional headers related to security
<IfModule mod_headers.c>
    # defends against 'ClickJacking' attacks by disallowing this site to be displayed in an IFRAME
    Header always append X-Frame-Options DENY
    # helps prevent attacks based on MIME-type confusion by rejecting css/js responses with incorrect MIME type
    Header always append X-Content-Type-Options nosniff
</IfModule>

如果你们有任何想法请发布

感谢

1 个答案:

答案 0 :(得分:1)

尝试添加此行以确保选项正确无误:

Options +FollowSymlinks -MultiViews