【问题标题】:Some server giving "No input file specified"某些服务器给出“未指定输入文件”
【发布时间】:2021-08-11 10:28:40
【问题描述】:

我需要有关我的 htaccess 的帮助。我正在使用以下 htaccess 规则,它在某些服务器上运行良好。但是有些服务器给No input file specified我已经搜索了一些关于堆栈溢出的解决方案。

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

例如,此 RewriteRule 将修复 RewriteRule ^(.*)$ index.php?$1 [L]No input file specified,但某些页面无法像 https://www[dot]webadress[dot]com/settings?tab=page 那样打开

我需要做什么来修复 No input file specified 我的 RewriteRule 中需要 QSA。

任何人都可以帮助我。

【问题讨论】:

  • 您在浏览器中点击的示例网址是什么?

标签: .htaccess mod-rewrite url-rewriting query-string friendly-url


【解决方案1】:

对于不存在的页面 uris/requests,您可以尝试以下规则。除了规则,请确保您的 index.php 位于 index.php 所在的同一文件夹中。请在测试您的 URL 之前清除您的浏览器缓存。

RewriteEngine ON
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/?$ index.php [QSA,L]

【讨论】:

    猜你喜欢
    • 2021-05-14
    • 1970-01-01
    • 1970-01-01
    • 2012-10-02
    • 2014-08-20
    • 1970-01-01
    • 1970-01-01
    • 2016-06-09
    • 1970-01-01
    相关资源
    最近更新 更多