.htaccess不将请求转发到其他域

.htaccess不将请求转发到其他域,.htaccess,redirect,.htaccess,Redirect,这是我的.htaccess RewriteEngine on # If a directory or a file exists, use it directly RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d # Otherwise forward it to index.php RewriteRule . index.php RewriteCond %{HTTP_HOST} ^api.exam

这是我的.htaccess

RewriteEngine on

# If a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Otherwise forward it to index.php
RewriteRule . index.php

RewriteCond %{HTTP_HOST} ^api.example.com [NC]
RewriteRule ^(.*)$ https://www.example.com [L,R=301,NC]

#For api send authorization header
RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule .* - [e=HTTP_AUTHORIZATION:%1]
当我试图发布到 它给了我这个

它不应该把我的请求转发给我吗 我不明白为什么它不起作用

编辑:
问题可能是ssl for不起作用

“问题可能是ssl for
https://api.example.com
不起作用“——这当然是问题所在。您的浏览器尝试连接到该URL,要成功连接,您的HTTPS设置必须正常。只有在浏览器成功地通过HTTPS连接到
https://api.example.com
。我知道了,谢谢“问题可能是
https://api.example.com
不起作用“——这当然是问题所在。您的浏览器尝试连接到该URL,要成功连接,您的HTTPS设置必须正常。只有在浏览器成功地通过HTTPS连接到
https://api.example.com
。我知道了,谢谢