找不到404 FIle

时间:2012-11-15 16:43:37

标签: php .htaccess amazon-ec2 http-status-code-404 bitnami

我正在使用亚马逊EC2,bitnami LAMP AMI。 我最近添加了一个文件夹,所以我可以测试另一个网站,例如www.website.com/foldername/ 我做了chmod 777到那个文件夹,所以我可以访问它,但问题是我只能访问位于www.website.com/foldername/的主页,当我点击任何其他页面它返回我

Not Found

The requested URL /foldername/landing was not found on this server.

据我所知,模板适用于其他未使用亚马逊的人,以下是我的htaccess

 SetEnv APPLICATION_ENV development

Options -Indexes
Options +FollowSymLinks
DirectoryIndex index.php index.html

<IfModule mod_rewrite.c>
RewriteEngine on

RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.*)\?*$ index.php [L,QSA]

#remove www.
#RewriteCond %{HTTPS} off
#RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
#RewriteRule ^(.*)$ http://%1/$1 [R=301,L]

#RewriteRule ^(.*\.(png|jpg|jpeg|gif))$ index.php?controller=minify&action=index&file_path=$1&ext=$2 [L,NC]
#RewriteRule ^(.*\.(css|js))$ index.php?controller=minify&action=jscss&file_path=$1&ext=$2 [L,NC]

</IfModule>

ErrorDocument 404 index.php

<ifModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 1 seconds"
ExpiresByType application/x-javascript "access plus 216000 seconds"
</ifModule>

<FilesMatch "\.(htaccess|htpasswd|ini|log|sh|inc|bak|cache)$">
Order Allow,Deny
Deny from all
</FilesMatch>

希望有人可以帮助我。 :\

1 个答案:

答案 0 :(得分:0)

这实际上是一个apache问题。抱歉! :) 我被建议不要使用bitnami进行生产,出于某种原因,它的apache禁用了一些东西,它有利于开发。

相关问题