Here is an example of the URL's we will be rewriting
We will be using an Nginx location to perform the rewrite
location ~ "^/([0-9]{4})/([0-9]{2})/([a-zA-Z0-9_.-]+)/$" {
rewrite ^(.*)/(.*)/(.*)/ /$3/ permanent;
}
You will want to enter this in above your location / {
Example:
location ~ "^/([0-9]{4})/([0-9]{2})/([a-zA-Z0-9_.-]+)/$" {
rewrite ^(.*)/(.*)/(.*)/ /$3/ permanent;
}
location / {
# Wordpress Permalinks
try_files $uri $uri/ /index.php?q=$uri&$args;
}