Has anyone tested this on centmin yet? Thanks, Itworx4me
Several people on the Xenforo forum are complaining that this addon doesn't work on nginx and haven't got a formal response from Xenforo, they said it's not supported by them. The addon in question is for Xenforo 2: XenForo Redirects for vBulletin The latest version is 1.1.5 It redirects old vbulletin URLs to Xenforo, but it only works correctly on apache. Has anyone got this working? I tried a recommended fix which fixed 95% of redirects but introduced another bug where certain URLs are redirecting to "domain.com/domain.com/" Besides this, everything is working perfectly, and other people are complaining of the same issue, so I'm mostly sure that it's not my config. The Xenforo friendly URL rewrites are setup and working correctly per the instructions, so again, that should not be a cause of the issue. Here is the important portion of my conf: Code: location / { try_files $uri $uri/ /index.php?$uri&$args; index index.php index.html; #auth_basic "Private"; #auth_basic_user_file /usr/local/nginx/conf/htpasswd; include /usr/local/nginx/conf/503include-only.conf; # block common exploits, sql injections etc include /usr/local/nginx/conf/block.conf; } location /admin.php { auth_basic "Private"; auth_basic_user_file /usr/local/nginx/conf/htpasswd; include /usr/local/nginx/conf/php.conf; } location /install/ { auth_basic "Private"; auth_basic_user_file /usr/local/nginx/conf/htpasswd; include /usr/local/nginx/conf/php.conf; } location /install/data/ { internal; } location /install/templates/ { internal; } location /internal_data/ { internal; } location /library/ { #legacy internal; } location /src/ { internal; } location ~ \.php$ { #vbulletin redirect partial fix: #try_files $uri /index.php?$uri&$args; #normal: #try_files $uri =404; fastcgi_pass 127.0.0.1:9000; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } My post on Xenforo forum is here, for more info: XenForo Redirects for vBulletin Any help would be appreciated.
Fixed! you must have the Xenforo Redirects for vBulletin addon installed, and select your "import_log" table in the addon options. In the PHP block: you must comment out: Code: try_files $uri =404; replace it with: Code: try_files $uri /index.php?$uri&$args; Then restart nginx and clear your browser cache and maybe any other caches. Should that not solve your problem here is a fix for showthread.php, put this above you "location /" block Code: location ~ ^/showthread.php { if ($args ~* ^(\d+)-(.+)$) { set $tid $1; set $args ''; rewrite ^ /threads/$tid permanent; } if ($args ~* ^t=(\d+)$) { set $tid $1; set $args ''; rewrite ^ /threads/$tid permanent; } }
I made a little video tutorial on nginx vbulletin -> xenforo redirects with friendly URLS part of my larger tutorial series CentMin Mod Beginner Video Tutorials
My problem is related to the exact same thing so I will post it here, Vbulletin forum was on site.com/forum/ new xenforo is on site.com/ I have created a directory named forum and moved the index.php and corrected the path as in the xenforo guide, but it's still not redirecting. but all urls are redirecting correctly without the /forum/ part. Can you guys help me with a little rewrite rule to remove this /forum/ part from the nginx $uri? I've tried this: Code: location ~ \.php$ { if ($uri ~ ^/forum/.*$) { rewrite ^/forum/(.*$) ^$1 permanent; } try_files $uri /index.php?$uri&$args; add_header X-uri2 "$uri"; fastcgi_pass 127.0.0.1:9000; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } and it gets stuck in a loop and stops the connection here Code: https://site.comt/forum/%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5Eshowthread.php?t=1449456 there is something wrong with this part Code (Text): rewrite ^/forum/(.*$) ^$1 permanent; edit: location ~ ^/forum/.*$ { rewrite ^/forum/(.*$) /$1 permanent; } this did the trick