gpt4 book ai didi

apache - 将特定文件从 https 重定向到 http

转载 作者:太空宇宙 更新时间:2023-11-03 13:41:22 28 4
gpt4 key购买 nike

我的 .htaccess 中有这段代码:

RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.megabits.es/$1 [R,L]

但我试图为文件夹/api/中的文件或 api 中的文件(secure.php 和 xml.php)创建一个异常(exception),以便它们保持在 HTTP 上。

这可能吗?

谢谢大家。

最佳答案

为其添加另一个条件:

RewriteCond %{SERVER_PORT} 80
RewriteCond %{REQUEST_URI} !^/api/
RewriteRule ^(.*)$ https://www.megabits.es/$1 [R,L]

关于apache - 将特定文件从 https 重定向到 http,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21172850/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com