nginx: URL rewrites and performance
Posted
by
j0nes
on Server Fault
See other posts from Server Fault
or by j0nes
Published on 2012-10-24T12:16:12Z
Indexed on
2012/10/24
23:03 UTC
Read the original article
Hit count: 218
I have a website where I need to change the URL structure. The old URLs look like /olddir/part1_de.htm
, the new ones will look like /newdir/sub/category/anotherpage.htm
. There are a lot of URL rewrites I need to do, I assume about 500 distinct rewrites in the end.
As my website gets quite a lot of traffic, my main concern is about performance at the moment. My questions are:
- I assume that for each request, the rewrites block will be parsed and the regex will be evaluated. Am I right?
- Will there be a performance penalty if I use these rewrites? Can nginx handle this?
- Are there any "best practices" to follow when doing a lot of rewrites?
© Server Fault or respective owner