Php .htaccess通过预先添加https从文件夹重定向到特定文件
我做了一些研究,但找不到我真正需要的东西 到目前为止,如果要访问Linux主机上名为settings的文件夹,我会使用以下方法访问其中名为settings.php的文件:Php .htaccess通过预先添加https从文件夹重定向到特定文件,php,apache,.htaccess,redirect,https,Php,Apache,.htaccess,Redirect,Https,我做了一些研究,但找不到我真正需要的东西 到目前为止,如果要访问Linux主机上名为settings的文件夹,我会使用以下方法访问其中名为settings.php的文件: RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ settings.php [QSA,L] www.mydomain.com/settings/ 因此将触发:www.mydomain.com/settings/settings.p
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ settings.php [QSA,L]
www.mydomain.com/settings/
因此将触发:www.mydomain.com/settings/settings.php
但是现在,对于这个特定的文件,我想在前面包含https,不管是访问文件夹,还是包含一些额外php条件的文件,比如?status=1。
所以我认为我的第一句话(!-f)不再适用了
因此,无论是请求www.mydomain.com/settings/还是www.mydomain.com/settings/settings.php?whatever=1,以及www.mydomain.com/settings/?whatever=1,
我希望将https应用到它上
有人能帮我吗?
我将不胜感激
提前多谢 可能重复的谢谢!这很有帮助