Please help me with url rewriting on nginx.
I have a wordpress site with some example of urls structure like this:
Then I decided to change permalink structure from
So at this point, url permalink structure of my wordpress is:
Currently I’ve made a nginx rewrite rules:
rewrite ^/[0-9]+/(.*) http://example.com/$1 permanent;
This url rewrite only works if user entered url by adding .html manually to end of the url.
But what I want is nginx automatically redirecting if user entered or clicking url:
http://example.com/9999/this-is-title-page/ **OR** http://example.com/this-is-title-page/ **OR** http://example.com/this-is-title-page
Can someone help me with nginx rewriting rules like that?