We had a database corruption on our website, now we are building a new one.
However, we have thought off a different approach, we are migrating our old articles to a sub domain and building a new website with a better UI and architecture.
What I would like to do is redirect url from old website to the sub domain, with out in the format as this:
http://olddomain.com/foo/something
to
http://sub.olddomain.com/foo/something
and we want to keep the the olddomain to serve new content
http://oldomain.com/foo2/something
is this possible with Nginx
UPDATE
We have a set word based on which we want to redirect
we just want
http://olddomain/foo/extrainfo
to redirect
http://sub.olddomain/foo/extra
when using the rewrite rule
/abc/ redirect permanent
we are having an issues that is a URL has word foo it's getting redirected to the new domain.
we just want http://olddomain/foo/
to redirect to http://sub.olddomain./foo/extra
not http://olddomain/abc/foo
to http://sub.olddomain