WordPress: Redirecting Old Tag URL to New Tag Location

last updated in Categories Howto, lighttpd, Linux, php

Recently, I had noticed lots of 404 error generated by my wordpress software. My old wordpress tag structure changed from:


As a result lots of error 404 was dumped into my log file. I wrote a small php code to get rid of the problem.