• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.2 Redirection vbseo in Nginx

#1
helps me to convert
Code:
RewriteRule [^/]+/([\d]+)-.+-([\d]+).html showthread.php?t=$1&page=$2 [NC,L]
RewriteRule [^/]+/([\d]+)-.+.html showthread.php?t=$1 [NC,L]
My rules current
Code:
location / {
    try_files $uri $uri/ /index.php?$uri&$args;
    index index.php index.html;
}

location /internal_data/ {
    internal;
}
location /library/ {
      internal;
}
 
Last edited:
#2
reason why I install nginx centminmod :) http://centminmod.com/
so I do not succeed
I offer one solution is to use centminmod and that is the case I
Solution :
Fix centminmod nginx for xenforo
EDIT file staticfiles.conf

location ~* \.(html|htm|txt)$ {
#add_header Pragma public;
add_header Cache-Control "public, must-revalidate, proxy-revalidate";
access_log off;
expires 7d;
break;
}
to

location ~* \.(htm|txt)$ {
#add_header Pragma public;
add_header Cache-Control "public, must-revalidate, proxy-revalidate";
access_log off;
expires 7d;
break;
}

Rewrite

rewrite [^/]+/([\d]+)-.+-([\d]+).html /threads/$1 redirect;
rewrite [^/]+/([\d]+)-.+.html /threads/$1 redirect;
rewrite [^/]+/([\d]+)-.+-([\d]+).html /showthread.php?t=$1&page=$2 break;
rewrite [^/]+/([\d]+)-.+.html /showthread.php?t=$1 break;
 

DRaver

Active member
#3
For me it´s not redirect site two of an old thread to site two of the new site. Site two will redirect to site one with that rules.