1

I need to: replace old SEO unfriendly URLs with new SEO friendly URLs

e.g. replace

http://../products/?type=genre.main.key&key=DAN&title=Dance&page=1

with

http://../genres/dance?key=DAN&pg=1

and replace

http://../products/?type=genre.key&key=HOU&title=House&page=1

with:

http://../genres/dance/house?key=HOU&pg=1

implementation:

  1. Do the mapping client side (angular).
    • I guess this is going to be rather complex
  2. Do the mapping in nginx configuration.
    • create permanent redirects (301) for all old to new (using regex)
    • create a proxy server that serves the old and use a proxy pass to route new to old

The 2nd approach would (I think) make sure that the SEO friendly urls are indexed (2a) and the new urls are mapped onto the old urls that are served by the proxyserver.

Is the above approach (outlined under 2) valid? Is this a proper strategy?

(this is before I want to try make this work, because I have almost no experience with the nginx configuration, so it will be a daunting task)

Thanks for your advice. Regards, dexter

dexter
  • 131
  • 2
  • 6
  • You _can_ do this in nginx with enough fiddling and beating of hammers, but the best place to do this is within your server-side app. – Michael Hampton Mar 03 '16 at 16:20
  • So, actually you are presenting option 3) server-side. However I don't see what you mean. Could you give a bit more information please? – dexter Mar 03 '16 at 18:44
  • Unless you have an extraordinarily simple web site, you'll have a server-side application (probably written with Node.js) which handles things like your REST API. This can also handle redirects from old URLs. – Michael Hampton Mar 03 '16 at 19:20
  • OK. I get the idea. Indeed we do have a REST layer written in Node.js. Actually I wrote the prototype for it (https://www.vinylxl.nl/nl/) – dexter Mar 03 '16 at 21:38

0 Answers0