To To This post was last edited by ningfeng.im at 2020-7-1410:27 After the permalink is modified: /%post_id% is replaced by /%post_id%.html How to write NGINX's 301 rule, all old links are 404? -------------------------------------------------- ------------- I want to jump, I want to jump, I want to jump, I want the old link, correctly 301 to the new link! ! ! (Not a pseudo-static rule) -------------------------------------------------- ------------- Or can I ask the big guys in another way? https://www.hostloc.bid/1 https://www.hostloc.bid/2 https://www.hostloc.bid/3 https://www.hostloc.bid/4 https://www.hostloc.bid/5 301 jump to https://www.hostloc.bid/1.html https://www.hostloc.bid/2.html https://www.hostloc.bid/3.html https://www.hostloc.bid/4.html https://www.hostloc.bid/5.html How should the rules of nginx be written like this?

-------------------------------------------- ---------
Netizens reply: To To Quote: ningfeng.im published on 2020-7-1409:56 After using this plug-in, 301 is not available, and 301 is not available for a single test
Netizens reply: To To rewrite^/(.*)$https://example.com/$1.htmlpermanent;
Netizens reply: To To Just modify the pseudo-static directly, and refresh the pseudo-static directly under the BT settings
Netizen reply: To To Quote: shc published on 2020-7-1400:29 Apache is really fragrant, LiteSpeed ​​is really fragrant
Netizens reply: To To Quote: [MJJ] published on 2020-7-1400:30 Where did your blog move to?
Netizen Reply: To To Quote: shc published on 2020-7-1400:29 Apache is really fragrant, LiteSpeed ​​is really fragrant
Netizens reply: To To Currently my pseudo-static is as follows, you can try location/ { try_files$uri$uri//index.php?$args; } rewrite/wp-admin$$scheme://$host$uri/permanent;
Netizens reply: To To This post was last edited by ningfeng.im at 2020-7-1408:32 Quote: Chiser published on 2020-7-1408:25 Currently my pseudo-static is as follows, you can try
Netizen Reply: To To Quote: ningfeng.im published on 2020-7-1408:31 Big guy, I'm exactly the same as you, this is the default WP rule of BT, But I am now revising the permalink, From number to number.html
Netizens reply: To To Quote: Chiser published on 2020-7-1408:37 Is cache enabled?
Netizen Reply: To To Quote: ningfeng.im published on 2020-7-1408:46 Opened Redis and WPRocket
Netizens reply: To To Quote: ningfeng.im published on 2020-7-1408:46 Opened Redis and WPRocket
Netizens reply: To To Quote: Book of Autumn published on 2020-7-1408:52 That's the cache thing, just clear it out
Netizen reply: To To I have found a wp-permalinks-migration plug-in to use, but it is also invalid
Netizen reply: To To This post was last edited by jqbaobao at 2020-7-1409:14 Quote: ningfeng.im published on 2020-7-1408:55 After cleaning up, it should not be a cache problem, because adding rules will take effect immediately, and deleting rules will take effect immediately, but add N .html...
Netizens reply: To To The previous URL only had post_id and nothing else? Similar to http://domain name/12345?
Netizen Reply: To To Quote: malaohu published on 2020-7-1409:15 The previous URL only had post_id and nothing else? Similar to http://domain name/12345?
Netizen Reply: To To This post was last edited by kydtf at 2020-7-1409:30 You are not going to have a pseudo-static problem, you are going to solve the jump problem, right? Directly on a 301 jump plugin Try the WordPress Redirection plugin, 301. I don't want to use the plug-in to directly upload the code. It seems that there are many tutorials on the Internet, but there is no statistics on whether there are successes and errors.
Netizen Reply: To To Quote: ningfeng.im published on 2020-7-1409:23 Yes, nothing else. Just /%post_id% is replaced by /%post_id%.html
Netizens reply: To To Quote: kydtf published on 2020-7-1409:26 You are not going to have a pseudo-static problem, you are going to solve the jump problem, right? Directly on a 301 jump plugin Try WordPress' Redirection...
Netizens reply: To To Quote: malaohu published on 2020-7-1409:37 I did not test, you can modify it appropriately.
Netizen Reply: To To Quote: ningfeng.im published on 2020-7-1408:06 Brother can't do it, now the link becomes www.xxx.com/1.html.html.html.html.html.html.html.html.html.html A lot more...
Netizens reply: To To Are you on CDN? In the printing process, the permalinks of wordpress will be changed after a single modification?
Netizen Reply: To To Then you are not doing the pseudo-static right. WordPress changes the permalink and makes the pseudo-static rules. All the links will change, right?
Netizen Reply: To To Quote: ningfeng.im published on 2020-7-1409:56 After using this plug-in, 301 is not available, and 301 is not available for a single test
Netizens reply: To To Quote: Sanqi Development Form at 2020-7-1412:37 There is a pseudo-static on the pagoda. You did not choose a good rule
Netizen reply: To To Quote: ningfeng.im published on 2020-7-1412:40 I chose wordpress, which one should the boss choose?

Label: none