重定向从http一个特定的页面在Word preSS的.htaccess HTTPS [英] Redirect a specific page from http to https in wordpress .htaccess

查看:236
本文介绍了重定向从http一个特定的页面在Word preSS的.htaccess HTTPS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要在我的字preSS的网站从HTTP到HTTPS重定向只有一个页面。我在网上搜索,但没有一个解决方案,似乎工作。这是code我在我的.htaccess文件:

I need to redirect only one page in my wordpress site from http to https. I searched online but none of the solutions seem to work. This is the code I have in my .htaccess file:

# Redirect to force SSL on test page
RewriteCond %{HTTPS} off
RewriteRule ^test/$ https://www.example.com/test/ [R=301,L]

任何建议将是极大的AP preciated。

Any suggestions would be greatly appreciated.

推荐答案

这个怎么样?

RewriteEngine On
RewriteRule ^my-test-page\.html$ https://www.domain.com/my-test-page.html [R=301,L]

干杯。

这篇关于重定向从http一个特定的页面在Word preSS的.htaccess HTTPS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆