Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/235.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 404找不到文件_Php_.htaccess_Amazon Ec2_Http Status Code 404_Bitnami - Fatal编程技术网

Php 404找不到文件

Php 404找不到文件,php,.htaccess,amazon-ec2,http-status-code-404,bitnami,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.

我使用的是亚马逊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>
SetEnv应用程序\u ENV开发
选项-索引
选项+FollowSymLinks
DirectoryIndex.php index.html
重新启动发动机
重写基/
重写cond%{REQUEST_FILENAME}-F
重写cond%{REQUEST_FILENAME}-D
重写规则^(.*)\?*$index.php[L,QSA]
#删除www。
#重写条件%{HTTPS}关闭
#重写条件%{HTTP_HOST}^www\.(.*)$[NC]
#重写规则^(.*)$http://%1/$1[R=301,L]
#重写规则^(.*\(png | jpg | jpeg | gif))$index.php?controller=minify&action=index&file_path=$1&ext=$2[L,NC]
#重写规则^(.*\(css|js))$index.php?controller=minify&action=jscss&file_path=$1&ext=$2[L,NC]
ErrorDocument 404 index.php
过期于
ExpiresDefault“访问加1秒”
ExpiresByType应用程序/x-javascript“访问时间加216000秒”
命令允许,拒绝
全盘否定

希望有人能帮助我\

这实际上是apache的问题。对不起!:) 有人建议我不要在生产中使用bitnami,因为某些原因,它的apache禁用了一些东西,这有利于开发