Welcome! Log In Create A New Profile

Advanced

Question on 301 redirect

August 04, 2011 11:52PM
Hi,

Is there any way I can 301 redirect a lot of (>10k) old urls to new urls in nginx conf?
Writing 10k lines of rewrite rules seems to be not efficient as those rules will get checked for every single request.
I'm thinking of some data structure like dict in python which can have a quick look up of the key and then do the redirect of the value. The question is how can I do that in nginx?

Thanks a lot!
Subject Author Posted

Question on 301 redirect

zflairz August 04, 2011 11:52PM

Re: Question on 301 redirect

Maxim Dounin August 05, 2011 02:38AM

Re: Question on 301 redirect

zflairz August 05, 2011 03:53AM

Re: Question on 301 redirect

Maxim Dounin August 05, 2011 04:54AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 100
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready