我今天遇到了一个奇怪的问题,我试图通过谷歌修复它到目前为止没有运气。
问题是我在 zend 框架应用程序中有一个 IndexController.php 文件,它有一个简单的操作叫做 about 但是当我试图通过它访问它时
http://mysite/index/about
它会给我 404
如果尝试过
http://mysite/Index/about
它会正确加载(使用大写 I)这个案例问题只给索引控制器我的其他控制器在 ubuntu 上运行良好
这里是我的 htaccess 文件,我启用了 mod_rewirte 并且 allowe_overried 已设置为 all
# 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>
如果你们有任何想法,请发表
谢谢