服務器網絡服務

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

 

標籤

發表評論

您的電子郵件地址不會被公開. 必需的地方已做標記 *