Php 如何通过htaccess从一个http域重定向到另一个https域?

Php 如何通过htaccess从一个http域重定向到另一个https域?,php,apache,.htaccess,mod-rewrite,redirect,Php,Apache,.htaccess,Mod Rewrite,Redirect,我想重定向 http://abc.one.com/mysettings/marks 到 我在htaccess文件下面添加了几行,但似乎不起作用。请告诉我哪里出了问题 RewriteCond %{HTTP_HOST} ^http://abc.one.com/mysettings/marks [NC] RewriteRule ^(.*)$ https://xyz.two.com/mysettings/marks [L,R=301] 你可以使用 RewriteCond %{HTTP_HOST} ^

我想重定向

http://abc.one.com/mysettings/marks

我在htaccess文件下面添加了几行,但似乎不起作用。请告诉我哪里出了问题

RewriteCond %{HTTP_HOST} ^http://abc.one.com/mysettings/marks [NC]
RewriteRule ^(.*)$ https://xyz.two.com/mysettings/marks [L,R=301]
你可以使用

RewriteCond %{HTTP_HOST} ^abc\.one\.com$ [NC]
RewriteRule ^mysettings/marks/?$ https://xyz.two.com/mysettings/marks [L,R=301]
不要在HTTP\u主机条件下使用URI。

您可以使用

RewriteCond %{HTTP_HOST} ^abc\.one\.com$ [NC]
RewriteRule ^mysettings/marks/?$ https://xyz.two.com/mysettings/marks [L,R=301]
不要在HTTP\u主机条件下使用URI。

您可以使用

RewriteCond %{HTTP_HOST} ^abc\.one\.com$ [NC]
RewriteRule ^mysettings/marks/?$ https://xyz.two.com/mysettings/marks [L,R=301]
不要在HTTP\u主机条件下使用URI。

您可以使用

RewriteCond %{HTTP_HOST} ^abc\.one\.com$ [NC]
RewriteRule ^mysettings/marks/?$ https://xyz.two.com/mysettings/marks [L,R=301]

不要在HTTP\u主机条件下使用URI。

也要使用301重定向方法。因为重定向301/old-page.html也使用301重定向方法。因为重定向301/old-page.html也使用301重定向方法。因为重定向301/old-page.html也使用301重定向方法。因为重定向301/old-page.html

可能重复的可能重复的可能重复的可能重复的可能重复的