whyweprotest
Well-known member
Hi all,
We are in the process of migrating from vbulletin 3.8.x to xenforo. Obviously we would like to redirect our many existing links to their new home using the 301 redirect script that kier provided and the XFSEO recipe tool from Shadab. However, since it is all written for apache (and since I suck at nginx rewrite rules it would seem) I am having some difficulty which I am hoping someones ginormous brain can help with!
vB showthread format: http://forums.whyweprotest.net/233-website-issues-requests/wiki-down-73789/
XF showthread format: http://forums.whyweprotest.net/threads/the-wiki-is-down.65509/
vB forumdisplay format: http://forums.whyweprotest.net/233-website-issues-requests/
XF forumdisplay format: http://forums.whyweprotest.net/forums/website-issues-and-requests.253/
The showthread method will redirect to the proper thread, however it never goes to the correct page if given. I'm sure I'm missing something, but when I looked at the showthread.php created by kier, I did not see anything in there to handle the &page var, just a postid.
The forumdisplay option is not working for me at all though.. and I believe I am failing in creating the rule for it. I'm a bit confused because it FEELS like I'm using the same methodology that worked for showthread, but... nope.
Has anyone faced similar issues (and succeeded) with trying to 301 in nginx?
We are in the process of migrating from vbulletin 3.8.x to xenforo. Obviously we would like to redirect our many existing links to their new home using the 301 redirect script that kier provided and the XFSEO recipe tool from Shadab. However, since it is all written for apache (and since I suck at nginx rewrite rules it would seem) I am having some difficulty which I am hoping someones ginormous brain can help with!
vB showthread format: http://forums.whyweprotest.net/233-website-issues-requests/wiki-down-73789/
XF showthread format: http://forums.whyweprotest.net/threads/the-wiki-is-down.65509/
vB forumdisplay format: http://forums.whyweprotest.net/233-website-issues-requests/
XF forumdisplay format: http://forums.whyweprotest.net/forums/website-issues-and-requests.253/
Code:
if (!-e $request_filename) {
rewrite [0-9a-zA-Z\-]/[0-9a-zA-Z\-]-([0-9])/([0-9])/ /showthread.php?t=$1&page=$2 last;
rewrite [0-9a-zA-Z\-]/[0-9a-zA-Z\-]-([0-9])/ /showthread.php?t=$1 last;
rewrite ([0-9])-[0-9a-zA-Z\-]/([0-9])/ /forumdisplay.php?f=$1&page=$2 last;
rewrite ([0-9])-[0-9a-zA-Z\-]/ /forumdisplay.php?f=$1 last;
rewrite ^(.*)$ /index.php last;
The showthread method will redirect to the proper thread, however it never goes to the correct page if given. I'm sure I'm missing something, but when I looked at the showthread.php created by kier, I did not see anything in there to handle the &page var, just a postid.
The forumdisplay option is not working for me at all though.. and I believe I am failing in creating the rule for it. I'm a bit confused because it FEELS like I'm using the same methodology that worked for showthread, but... nope.
Has anyone faced similar issues (and succeeded) with trying to 301 in nginx?