服务器网络服务

nginx的, 更改Apache服务器WordPress的永久链接 301 重定向

WordPress的永久链接 301 更改重定向

WordPress是当您更改自己的地址,该地址已经被创建的文档的最令人担忧的URL部分.

如果电梯乘坐一个外部链接,当你改变了自己的地址 404 发生了错误.

即使写,无论你什么时候改变它的外表是经营我会在第一时间多么紧张,创建时出现的网站

Yireolttae确实有用.

301 重定向

Nginx的和Apache已经被分为两类.

这些nginx的服务器以下添加到您网站上的conf文件,你会在WordPress改变您的永久链接设置.

更改后的名称的日期和名称

HTTPS://my.blogkor.com/%year%/%monthnum%/%day%/%postname%/ >> HTTPS://my.blogkor.com/%postname%

改写 “^ /([0-9]{4})/([0-9]{2})/([0-9]{2})/([^ /]+)/” HTTPS://my.blogkor.com/$4永久;

更改月份的名称和职位名称

HTTPS://my.blogkor.com/%year%/%monthnum%/%postname%/ >> HTTPS://my.blogkor.com/%postname%

改写 “^ /([0-9]{4})/([0-9]{2})/([^ /]+)/” HTTPS://my.blogkor.com/$3永久;

更改为名称发表数

HTTPS://my.blogkor.com/archives/%post_id% >> HTTPS://my.blogkor.com/%postname%

改写 “^ /档案馆/(\d +)” HTTPS://my.blogkor.com/?第1页= $常委;

更改后ID发布的名称

HTTPS://my.blogkor.com/%post_id% >> HTTPS://my.blogkor.com/%postname%

改写 “^ /(\d +)/” HTTPS://my.blogkor.com/?第1页= $常委;

 

对于Apache服务器

更改后的名称的日期和名称

HTTPS://my.blogkor.com/%year%/%monthnum%/%day%/%postname%/ >> HTTPS://my.blogkor.com/%postname%

RedirectMatch 301 ^ /([0-9]{4})/([0-9]{2})/([0-9]{2})/([^ /]+)$ HTTPS://my.blogkor.com/$4

更改月份的名称和职位名称

HTTPS://my.blogkor.com/%year%/%monthnum%/%postname% >> HTTPS://my.blogkor.com/%postname%

RedirectMatch 301 ^ /([0-9]{4})/([0-9]{2})/([^ /]+) $ HTTPS://my.blogkor.com/$3

更改为名称发表数

HTTPS://my.blogkor.com/archives/%post_id% >> HTTPS://my.blogkor.com/%postname%

RedirectMatch 301 ^ /档案馆/(\d +) $ HTTPS://my.blogkor.com/?P = $ 1

更改后ID发布的名称

HTTPS://my.blogkor.com/%post_id% >> HTTPS://my.blogkor.com/%postname%

RedirectMatch 301 ^ /(\d +)$ HTTPS://my.blogkor.com/?P = $ 1

 

标签

发表评论

Your email address will not be published. Required fields are marked *

还要检查