【问题标题】:Any idea why this .htaccess can cause 500 internal server error?知道为什么这个 .htaccess 会导致 500 内部服务器错误吗?
【发布时间】:2015-03-14 19:43:29
【问题描述】:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ api/index.php [QSA,L]

我使用了 Slim 微框架的示例 .htaccess

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [QSA,L]

并在 index.php 之前添加了api,现在我的应用程序无法运行。为什么?

【问题讨论】:

    标签: php .htaccess apache2


    【解决方案1】:

    如果您确定 api 文件夹中有 index.php,请尝试将其更改为

    RewriteRule ^ api\/index.php [QSA,L]

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-11-23
      • 1970-01-01
      • 1970-01-01
      • 2017-07-31
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多