404文件未找到
问题描述:
我正在使用亚马逊EC2,bitnami LAMP AMI。 我最近添加了一个文件夹,所以我可以测试另一个网站,例如www.website.com/foldername/ 我做了chmod 777到该文件夹,所以我可以访问它,但问题是我只能访问位于主页www.website.com/foldername/当我点击任何其他网页返回我404文件未找到
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>
希望有人能帮助我。 :\
答
这实际上是一个Apache的问题。抱歉! :) 我被建议不要使用bitnami生产,由于某种原因,它的apache禁用了一些东西,它对开发很有帮助。