Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

smarter permanent redirects

$
0
0
Hello,

Pretty much a nube to this. Hopefully somebody can help me out with some questions.

Our client is going to migrate their website to our services - we provide the backend, and there is an all new frontend.

They have a fantastic reputation in their industry, sell a few thousand products, and have hundreds of links to their products as well as prominently featuring in Google searches. Obviously, we don't want that to be affected at all.

They will retain their current domain name, but the structure below that will probably change drastically. Simple redirects do not look like they will cut it.

e.g.
www.xyz.com/path1/product1 may need to redirect to www.xyz.com/newpath1/product1
www.xyz.com/path1/product2 may need to redirect to www.xyz.com/newpath2/product2
www.xyz.com/path2/product3/variant may need to redirect to www.xyz.com/newpath1/product4

Is there any way to get nginx to call a program, or a very advanced rountine, to best guess a redirect? The information about where to redirect could very well end up being stored in an sql table.

Or, is the only real possibility to make

www.xyz.com/path1/x redirect to www.xyz.com/redirectorpage/path1/x

and write a handler there?


Also, is there any difference between using "rewrite" to accomplish a redirect, or returning a 301 permanent redirect???

Thankyou in advance for any guidance,

Richard

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>