WordPress.org

Support

Support » How-To and Troubleshooting » Nginx rewrite rule for wordpress to remove date and html from the permalink

Nginx rewrite rule for wordpress to remove date and html from the permalink

Viewing 2 replies - 1 through 2 (of 2 total)
  • The following may work for you…

    rewrite "^/[\d]{4}/[\d]{2}/(.*).html$" /$1 permanent;

    You may put it at the top of all other rewrite and location directives. I hope that helps.

    I know this topic is 11 months old but it’s partly relevant to a desire of mine.

    I wish to hide the numerical information from the display urls / permalinks.

    For example:

    http://websitename/2014-07-30/gardening/bestflowerseeds/10

    Would display to the users as:

    http://websitename/gardening/bestflowerseeds.

    I’ve found many redirect plugins but none of them appear to be able to do this.

    I also found Yoasts Redirect page but a) it doesn’t seem to work and b) it doesn’t appear to include category, just post name, i wish for both.

    Any help and advice would be greatly appreciated!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Nginx rewrite rule for wordpress to remove date and html from the permalink’ is closed to new replies.
Skip to toolbar