WordPress htaccess

编程入门 行业动态 更新时间:2024-10-27 04:37:19
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.

更多推荐

本文发布于:2023-08-07 14:35:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1464774.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:WordPress   htaccess

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!