Nginx URL Redirect For Old WordPress Permalink
Table of Contents
Seems URL rewrite/redirect is a never ending story.
When I switched my blogging platform from Ghost to Hugo, I also switched the web serving component.
I used my own h2ghost with Ghost as both were nodejs applications.
However Hugo produce static pages and I decided to look into other http server options.
Log was set to minimum when I was using h2ghost. But once I switched to Nginx, Logwatch start showing the 404 listing. To my surprise, other than all the random attacks, there are a few old WordPress permalink popping up.
/index.php/2012/12/06/tiny-vps-postfix/: 1 Time(s) /index.php/category/phone/: 1 Time(s) /index.php/sample-post/: 1 Time(s) /index.php/tiny-vps-postfix/: 1 Time(s)
To save those requests, I need to implement redirect/rewrite again, just like old times. Luckily the regex from my old Lighttpd still works.
Now /index.php/tiny-vps-postfix/ works again!!