Morning all,

On my previous server that ran apache I had some htaccess rules that helped forward a certain pattern of URL’s which were giving 404’s to the fixed pattern.

Long time ago my URLS for my site were http://domainname/articlename and then I changed it to be http://domainname/category/articlename

Now the problem is the older links that google has are returning 404’s and I want to intercept any URL that doesn’t have a category and insert a fake category and then my wordpress installation can resolve the URL.

So I’m looking for a nginx solution to this problem which I presume will be in the config file somewhere that will take this URL

http://www.criticalhit.net/prey/ (which gives a 404)

and change it to

http://www.criticalhit.net/fixed/prey/

which then resolves properly.

Read more here: Regular Expression to fix broken URL’s in Nginx


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: