XenForo Redirects for vBulletin

XenForo Redirects for vBulletin 1.1.9

No permission to download
ive installed the new tool for xf2(actually twice now)...just as mentioned in the above posts...it did not fix the issue.
 
I could be wrong as I don't actually have it installed, but from looking at the code I'd imagine you need friendly URLs setup for this to work properly (as otherwise those links won't hit XF's router).
 
  • Like
Reactions: TUG
What do we need to do as users to get this addon fixed? We already opened tickets and we were told to post in this thread instead of opening tickets, we've posted in this thread multiple times and nothing is being done. I hate to be annoying but this is serious issue that many people are having.

I think many issues in this thread are due to inexperience of the user and misconfiguration, but there is a significant subset of users whose problems can't be chalked up to those causes. What do we need to do to convince the powers that be to take the issues more seriously? Posting in this thread doesn't seem to have any effect. I have been patient and waited several months so I am bringing this topic up again.
 
Any help on converting the htaccess to nginx rewrites?

<IfModule mod_rewrite.c>
RewriteEngine On

# If you are having problems with the rewrite rules, remove the "#" from the
# line that begins "RewriteBase" below. You will also have to change the path
# of the rewrite to reflect the path to your XenForo installation.
#RewriteBase /xenforo

# This line may be needed to enable WebDAV editing with PHP as a CGI.
#RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^(data/|js/|styles/|install/|favicon\.ico|crossdomain\.xml|robots\.txt) - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
</IfModule>
 
I made a little video tutorial regarding installing this plugin and using it with friendly URLS on nginx
To view this content we will need your consent to set third party cookies.
For more detailed information, see our cookies page.
 
I'm struggling with these as well... have some old vbseo links that used to work on xf 1.x like
forum-title/thread-name-nnnnn/ where nnnn is the thread id. I've tried several variants and i just end up at the xf 'oops' page all the time.
 
Hey, I run 3 VB forums and am in the process of migrating them to XF. I had a concern regarding SEO. I spoke with my SEO guy and he said that using the 301 redirects will ruin our google rankings. My sites all have excellent rankings and have been around for 20 years, with over 1 million threads in total. I am very worried about losing my google ranking. Is this a credible concern? Anything I can do? Thanks.
 
I made a little video tutorial regarding installing this plugin and using it with friendly URLS on nginx
To view this content we will need your consent to set third party cookies.
For more detailed information, see our cookies page.
I'm getting 404 error

This is what in nginx vhost file location /
NGINX:
  location / {
  index index.php index.html index.htm;
  try_files $uri $uri/ /index.php?$uri&$args;
  include /usr/local/nginx/conf/503include-only.conf;

# block common exploits, sql injections etc
#include /usr/local/nginx/conf/block.conf;

  # Enables directory listings when index file not found
  #autoindex  on;

  # Shows file listing times as local time
  #autoindex_localtime on;

  # Wordpress Permalinks example
  #try_files $uri $uri/ /index.php?q=$uri&$args;

  }

  include /usr/local/nginx/conf/pre-staticfiles-local-stage.conf;
  include /usr/local/nginx/conf/pre-staticfiles-global.conf;
  include /usr/local/nginx/conf/staticfiles.conf;
  include /usr/local/nginx/conf/php.conf;
 
  include /usr/local/nginx/conf/drop.conf;
  #include /usr/local/nginx/conf/errorpage.conf;
  include /usr/local/nginx/conf/vts_server.conf;
  auth_basic "Private";
  auth_basic_user_file /usr/local/nginx/conf/conf.d/stage.HtPasswd;
  location /install/data/ {
  internal;
  }

  location /install/templates/ {
  internal;
  }

  location /internal_data/ {
  internal;
  }

  location /library/ {
  internal;
  }

 
  location /src/ {
  internal;
  }

No errors in admin panel server errors log
Imported from vb 3.8
nginx version: nginx/1.17.9 (100420-175959-centos7-3cb25c3)
PHP 7.3.16

old urls are like site.com/forum/showthread.php?t=14494561940

I had the previous vbulleting installed in /forum/
And xenforo is in the document root directory.

Anyone can spot the issue?
I just installed official add-on and then config the log table in admin options. nothing else.
Do I have to set nginx configurations too? I have installed xenforo into the default public directory.
But neither site.com/forum/showthread.php?t=14494561940 or site.com/showthread.php?t=14494561940 urls aren't redirecting.
 
Post your php-section from your include and/or compare to my earlier post here : https://xenforo.com/community/threads/xenforo-redirects-for-vbulletin.142137/post-1255940

I've managed to redirect working by adding your code into the vhost config file followed by the original location / { block
like this:

NGINX:
location ~ \.php$ {
      try_files $uri /index.php?$uri&$args;
      fastcgi_pass    127.0.0.1:9000;
      fastcgi_param   SCRIPT_FILENAME $document_root$fastcgi_script_name;
      include         fastcgi_params;
  }
  location / {
  index index.php index.html index.htm;
  try_files $uri $uri/ /index.php?$uri&$args;
  include /usr/local/nginx/conf/503include-only.conf;

now the redirection is working to the root web url ( site.com/showthread.php?t=1234)
But not with the correct path. It was site.com/[B]forum[/B]/showthread.php?t=1234

So I've created a sub folder named 'forum' in public documents folder and copied index.php from SourceLocation to that folder and corrected the path

This time the error I'm getting is ''the requested page is couldn't be found"
ttxYhIw.png


hmmmm :rolleyes::rolleyes::confused:


And here is php include anyway
NGINX:
location ~ [^/]\.php(/|$) {
  include /usr/local/nginx/conf/503include-only.conf;
    fastcgi_split_path_info ^(.+?\.php)(/.*)$;
    if (!-f $document_root$fastcgi_script_name) {
        return 404;
    }
    fastcgi_keep_conn on;
    fastcgi_pass dft_php;
    #fastcgi_pass   127.0.0.1:9000;
    #fastcgi_pass   unix:/tmp/php5-fpm.sock;
    fastcgi_index  index.php;
    #fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
    fastcgi_param  SCRIPT_FILENAME    $request_filename;
    #fastcgi_param PHP_ADMIN_VALUE open_basedir=$document_root/:/usr/local/lib/php/:/tmp/;

# might shave 200+ ms off PHP requests
# which don't pass on a content length header
# slightly faster page response time at the
# expense of throughput / scalability
#sendfile on;
#tcp_nopush off;
#keepalive_requests 0;

fastcgi_connect_timeout 60s;
fastcgi_send_timeout 180s;
fastcgi_read_timeout 300s;
fastcgi_buffer_size 16k;
fastcgi_buffers 512 16k;
fastcgi_busy_buffers_size 1m;
fastcgi_temp_file_write_size 4m;
fastcgi_max_temp_file_size 4m;
fastcgi_intercept_errors off;

# next 3 lines when uncommented / enabled
# allow Nginx to handle uploads which then
# passes back the completed upload to PHP
#fastcgi_pass_request_body off;
#client_body_in_file_only clean;
#fastcgi_param  REQUEST_BODY_FILE  $request_body_file;

#new .04+ map method
fastcgi_param HTTPS $server_https;

# comment out PATH_TRANSLATED line if /usr/local/lib/php.ini sets following:
# cgi.fix_pathinfo=0
# as of centminmod v1.2.3-eva2000.01 default is set to cgi.fix_pathinfo=1

fastcgi_param  PATH_INFO          $fastcgi_path_info;
fastcgi_param  PATH_TRANSLATED    $document_root$fastcgi_path_info;

fastcgi_param  QUERY_STRING       $query_string;
fastcgi_param  REQUEST_METHOD     $request_method;
fastcgi_param  CONTENT_TYPE       $content_type;
fastcgi_param  CONTENT_LENGTH     $content_length;

fastcgi_param  SCRIPT_NAME        $fastcgi_script_name;
fastcgi_param  REQUEST_URI        $request_uri;
fastcgi_param  DOCUMENT_URI       $document_uri;
fastcgi_param  DOCUMENT_ROOT      $document_root;
fastcgi_param  SERVER_PROTOCOL    $server_protocol;
fastcgi_param  REQUEST_SCHEME     $scheme;
fastcgi_param  HTTPS              $https if_not_empty;
fastcgi_param  HTTP_PROXY         "";

fastcgi_param  GATEWAY_INTERFACE  CGI/1.1;
fastcgi_param  SERVER_SOFTWARE    nginx/$nginx_version;

fastcgi_param  REMOTE_ADDR        $remote_addr;
fastcgi_param  REMOTE_PORT        $remote_port;
fastcgi_param  SERVER_ADDR        $server_addr;
fastcgi_param  SERVER_PORT        $server_port;
fastcgi_param  SERVER_NAME        $server_name;

# Set php-fpm geoip variables
fastcgi_param GEOIP_COUNTRY_CODE $geoip_country_code;
fastcgi_param GEOIP_COUNTRY_CODE3 $geoip_country_code3;
fastcgi_param GEOIP_COUNTRY_NAME $geoip_country_name;
fastcgi_param GEOIP_CITY_COUNTRY_CODE $geoip_city_country_code;
fastcgi_param GEOIP_CITY_COUNTRY_CODE3 $geoip_city_country_code3;
fastcgi_param GEOIP_CITY_COUNTRY_NAME $geoip_city_country_name;
fastcgi_param GEOIP_REGION $geoip_region;
fastcgi_param GEOIP_CITY $geoip_city;
fastcgi_param GEOIP_POSTAL_CODE $geoip_postal_code;
fastcgi_param GEOIP_CITY_CONTINENT_CODE $geoip_city_continent_code;
fastcgi_param GEOIP_LATITUDE $geoip_latitude;
fastcgi_param GEOIP_LONGITUDE $geoip_longitude;

# PHP only, required if PHP was built with --enable-force-cgi-redirect
fastcgi_param  REDIRECT_STATUS    200;

                   }
 
AFAIR in the docs of this addon are steps mentioned if you have your forum in different locations compared to the original one. Did not apply to me so I can't help there. But from the nginx side you should be fine, as your requests reach xenforo. Only the addon has to get the paths to the former forum right ....

HTH
-Markus
 
AFAIR in the docs of this addon are steps mentioned if you have your forum in different locations compared to the original one. Did not apply to me so I can't help there. But from the nginx side you should be fine, as your requests reach xenforo. Only the addon has to get the paths to the former forum right ....

HTH
-Markus
Thank you very much for the help.
 
Last edited:
Top Bottom