Page 2 redirect not working

Brent W

Well-known member
This url: http://www.v6mustang.com/vb/f5/mustang-1994-3-8l-v6-1996-3-8l-v6-swap-244508/index2.html

Should go to this url: http://www.v6mustang.com/threads/mustang-1994-3-8l-v6-to-a-1996-3-8l-v6-swap.244508/page-2

Should it not?

Currently it 404's and doesn't redirect at all to the new url structure. If you remove the index2.html part it redirects to the first page fine.

rewrites:

Code:
location /vb/ {
        rewrite ^/vb/f[\d]+/.+-([\d]+)/index([\d]+).html /vb/showthread.php?t=$1&page=$2 last;
        rewrite ^/vb/f[\d]+/.+-([\d]+)/ /vb/showthread.php?t=$1 last;
        rewrite ^/vb/f([\d]+)/index([\d]+).html /vb/forumdisplay.php?f=$1&page=$2 last;
        rewrite ^/vb/f([\d]+)/ /vb/forumdisplay.php?f=$1 last;
}
 
Those aren't all the redirects if you are getting to XF structure. However, the first RegEx works, I just tested it.

Also, what page does it 404 on?
 
Those aren't all the redirects if you are getting to XF structure. However, the first RegEx works, I just tested it.

Also, what page does it 404 on?

Maybe you can expand? Don't really understand the what page does it 404 on question.

What other redirects do I need if those aren't the only ones? This is was vB4 forum to xenForo.

This url works: http://www.v6mustang.com/vb/f5/mustang-1994-3-8l-v6-1996-3-8l-v6-swap-244508/

This does not: http://www.v6mustang.com/vb/f5/mustang-1994-3-8l-v6-1996-3-8l-v6-swap-244508/index2.html

The last one that does not work is an old vBSEO url for the second page of a thread. The second page of the thread still exists here: http://www.v6mustang.com/threads/mustang-1994-3-8l-v6-to-a-1996-3-8l-v6-swap.244508/page-2

but the redirect isn't going through.
 
My error logs are filled with requests for paged threads that exist but aren't being redirected. Can someone help? I would be willing to pay if you can fix this problem.

http://www.v6mustang.com/vb/f19/wireless-interweb-questions-176660/index2.html

That should redirect to this page: http://www.v6mustang.com/threads/wireless-interweb-questions.176660/page-2

If you remove the index2.html it redirects to the first page correctly.

My conf for that domain:

Code:
#301 redirect non-www to www
server {
    server_name  v6mustang.com;
    rewrite ^    http://www.v6mustang.com$request_uri? permanent;
}

server {
  server_name www.v6mustang.com;

# ngx_pagespeed & ngx_pagespeed handler
include /usr/local/nginx/conf/pagespeed.conf;
include /usr/local/nginx/conf/pagespeedhandler.conf;
include /usr/local/nginx/conf/pagespeedstatslog.conf;

  # limit_conn limit_per_ip 16;
  # ssi  on;

  access_log /home/nginx/domains/v6mustang.com/log/access.log combined buffer=32k;
  error_log /home/nginx/domains/v6mustang.com/log/error.log;

  root /home/nginx/domains/v6mustang.com/public;

  location / {
index index.php index.html index.htm;
try_files $uri $uri/ /index.php?$uri&$args;
# 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;

  # Enable for vBulletin usage WITHOUT vbSEO installed
  #try_files        / /index.php;

  }

  location /internal_data/ {
        internal;
}
location /library/ {
      internal;
}

location ~ \.php$ {
        try_files $uri =404;
        fastcgi_pass    127.0.0.1:9000;
        fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include        fastcgi_params;
}

location /vb/ {
    rewrite ^/vb/f[\d]+/.+-([\d]+)/index([\d]+).html /vb/showthread.php?t=$1&page=$2 last;
    rewrite ^/vb/f[\d]+/.+-([\d]+)/ /vb/showthread.php?t=$1 last;
    rewrite ^/vb/f([\d]+)/index([\d]+).html /vb/forumdisplay.php?f=$1&page=$2 last;
    rewrite ^/vb/f([\d]+)/ /vb/forumdisplay.php?f=$1 last;
}

  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;
}

If you need more info please let me know.
 
I have the exact same problem with Nginx an Xenforo but no one can help me.
The change from a bigger vb site to a XF site, if you have Nginx, .....maybe not a good decision.
 
I have the exact same problem with Nginx an Xenforo but no one can help me.
The change from a bigger vb site to a XF site, if you have Nginx, .....maybe not a good decision.

Hate to see you are having the same problem but kind of glad it isn't just me.
 
Anyone else have any ideas? This is my last remaining redirect issue. Finally killed off the rest after hours of staring at a screen.

Current redirect setup:

Code:
location /vb/ {
        rewrite ^/vb/f[\d]+/.+-([\d]+)/index([\d]+).html /vb/showthread.php?t=$1&page=$2 last;
        rewrite ^/vb/f[\d]+/.+-([\d]+)/ /vb/showthread.php?t=$1 last;
        rewrite ^/vb/f([\d]+)/index([\d]+).html /vb/forumdisplay.php?f=$1&page=$2 last;
        rewrite ^/vb/f([\d]+)/ /vb/forumdisplay.php?f=$1 last;
        rewrite ^/vb/attachments/[^/]+/([0-9]+)d.+$ /index.php?attachments/$1/ permanent;
}
 
Back
Top Bottom