Rob
Well-known member
Hi there,
I have moved from apache/vb/vbseo to nginx/xenforo.
I am struggling to optimise my nginx config file and have so far received some generous help from Floren but am now scratching my head over how to proceed further.
I cannot pay anyone for this so I'm relying on the generosity of xenForo users to steer me in the right direction.
What I need is to be able to optimise the following nginx config
I've been told that when hitting "/category-name-73/forum-name-26/" then 4 regex's will be evaluated and supposedly that is not good. If I hit a deeper url at the same path then I'm told it will evaluate 3 regex's. However, it is apparently possible to do the above using just one regex. I am purplexed as to how this would be possible and clearly want to have the most optimised config I can but I now seem stuck in no mans land.
Can anyone please help me?
I have moved from apache/vb/vbseo to nginx/xenforo.
I am struggling to optimise my nginx config file and have so far received some generous help from Floren but am now scratching my head over how to proceed further.
I cannot pay anyone for this so I'm relying on the generosity of xenForo users to steer me in the right direction.
What I need is to be able to optimise the following nginx config
Code:
#Forum 26 main
location = /category-name-73/forum-name-26/ {
rewrite ^ /forums/forum-name.26/ permanent;
}
#Forum 26
location /category-name-73/forum-name-26/ {
#forum paging
rewrite ^/category-name-73/forum-name-26/index([\d]+).html /forums/forum-name.26/page-$1 permanent;
#thread paging (modified version of kier's redirect script)
rewrite [^/]+/([\d]+)-.+-([\d]+).html /showthread.php?t=$1&page=$2 last;
#thread
rewrite [^/]+/([\d]+)-.+.html /threads/redirectme.$1/ permanent;
}
I've been told that when hitting "/category-name-73/forum-name-26/" then 4 regex's will be evaluated and supposedly that is not good. If I hit a deeper url at the same path then I'm told it will evaluate 3 regex's. However, it is apparently possible to do the above using just one regex. I am purplexed as to how this would be possible and clearly want to have the most optimised config I can but I now seem stuck in no mans land.
Can anyone please help me?