WordPress htaccess - 将http重定向到https(WordPress htaccess - redirect http to https)

我想知道是否有人可以用这个帮助我们。

我们的网站在网站的各个页面中都有许多不安全的链接。 有些网页还包含来自http来源的图片,而不是https。

一个示例页面在这里: https : //mindfulpresenter.com/mindful-blog/the-10-most-important-things-in-presenting-today/ - 在这里你会看到有一些链接到http页面和页面是从http获取图像。

我希望通过更改htaccess文件来解决所有这些问题。

当前的htaccess文件如下所示:

# BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress

通过更改htaccess文件可以解决问题吗? 如果是这样,我需要添加什么?

非常感谢

詹姆士

I was wondering if someone could help us out with this one.

We have a site that has lots of insecure links in various pages across the site. Some pages are also including images from http sources and not https.

An example page is here: https://mindfulpresenter.com/mindful-blog/the-10-most-important-things-in-presenting-today/ - on here you will see that there are some links to http pages and the page is sourcing an image from http.

I was hoping that all of these issues can be resolved by making changes to the htaccess file.

The current htaccess file looks like this:

# BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress

Can the issues be resolved by making changes to the htaccess file? If so, what do I need to add to it?

Many thanks

James

最满意答案

看起来,这些链接位于您的页面/帖子的内容中,并以文本形式存储在数据库中。 我建议做一个搜索和替换来达到“干净”的状态。

有一些插件可以解析内容并动态创建这些链接,但我不认为这是最优雅的解决方案。

I found a 'Search and Replace' plugin for WordPress which searched the database and replaced all of the HTTP entries.

WordPress htaccess - 将http重定向到https(WordPress htaccess - redirect http to https)

我想知道是否有人可以用这个帮助我们。

我们的网站在网站的各个页面中都有许多不安全的链接。 有些网页还包含来自http来源的图片,而不是https。

一个示例页面在这里: https : //mindfulpresenter.com/mindful-blog/the-10-most-important-things-in-presenting-today/ - 在这里你会看到有一些链接到http页面和页面是从http获取图像。

我希望通过更改htaccess文件来解决所有这些问题。

当前的htaccess文件如下所示:

# BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress

通过更改htaccess文件可以解决问题吗? 如果是这样,我需要添加什么?

非常感谢

詹姆士

I was wondering if someone could help us out with this one.

We have a site that has lots of insecure links in various pages across the site. Some pages are also including images from http sources and not https.

An example page is here: https://mindfulpresenter.com/mindful-blog/the-10-most-important-things-in-presenting-today/ - on here you will see that there are some links to http pages and the page is sourcing an image from http.

I was hoping that all of these issues can be resolved by making changes to the htaccess file.

The current htaccess file looks like this:

# BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress

Can the issues be resolved by making changes to the htaccess file? If so, what do I need to add to it?

Many thanks

James

最满意答案

看起来,这些链接位于您的页面/帖子的内容中,并以文本形式存储在数据库中。 我建议做一个搜索和替换来达到“干净”的状态。

有一些插件可以解析内容并动态创建这些链接,但我不认为这是最优雅的解决方案。

I found a 'Search and Replace' plugin for WordPress which searched the database and replaced all of the HTTP entries.