ServerWeb service

nginx, Changing apache server WordPress permalink 301 redirect

WordPress permalink 301 Changing redirects

한국어English中文(简体)中文(漢字)Français日本語EspañolРусский
 Edit Translation

WordPress is the part that is most worrying URL of the document that have already been created when you change your own address.

If the lift ride an external link when you change your own address 404 An error has occurred.

Even write, no matter how nervous the first time I'd create a website that occurs when you change the look is operating

Yireolttae is indeed useful.

301 redirects

Nginx and apache has been divided into two kinds.

These nginx server add the following to the conf files on your site you will change your permalink settings in WordPress.

Change the date and name of the post name

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

rewrite “^/([0-9]{4})/([0-9]{2})/([0-9]{2})/([^/]+)/” https://my.blogkor.com/$4 permanent;

Change the name of the month and the post name

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

rewrite “^/([0-9]{4})/([0-9]{2})/([^/]+)/” https://my.blogkor.com/$3 permanent;

Change the number to the name Posts

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

rewrite “^/archives/(\d+)” https://my.blogkor.com/?p = $ 1 Standing;

Change the post ID to post names

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

rewrite “^/(\d+)/” https://my.blogkor.com/?p = $ 1 Standing;

 

For apache servers

Change the date and name of the post name

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

Change the name of the month and the post name

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

Change the number to the name Posts

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

RedirectMatch 301 ^/archives/(\d+) $ https://my.blogkor.com/?p=$1

Change the post ID to post names

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

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

 

Tags
Show More

Leave a Reply

avatar
  Subscribe
Notify of
Close