【问题标题】:404 FIle not found404 找不到文件
【发布时间】:2012-11-15 16:43:36
【问题描述】:

我正在使用亚马逊 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>

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

【问题讨论】:

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


    【解决方案1】:

    这实际上是一个 apache 问题。对不起! :) 有人建议我不要将 bitnami 用于生产,由于某种原因,它的 apache 禁用了一些东西,这对开发很有好处。

    【讨论】:

      猜你喜欢
      • 2013-01-04
      • 2022-06-13
      • 2019-05-06
      • 2019-09-29
      • 2019-01-12
      • 1970-01-01
      • 2016-01-25
      • 2016-10-25
      相关资源
      最近更新 更多