问题与重定向,永久链接wordpress


Problems with redirect, permalinks wordpress

我有一个wordpress网站,url是www.mysite.com/name-of-the-post

但是客户端更改为www.mysite.com/blog/name-of-the-post

现在我有一个问题,用户点击旧链接,他们无法访问内容。

我该如何解决这个问题?我读过一些关于htaccess正则表达式的东西,当用户试图访问旧链接时,我该如何添加"/blog"?

谢谢人

我将把这段代码放在哪里?我的htaccess是这样的:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^example.com [NC]
RewriteRule ^(.*)$ https://www.example.com/$1 [L,R=301,NC]
# Force HTTPS
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
# 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