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

XF 1.4 Redirections vB 3.8 with vBseo

Discussion in 'Installation, Upgrade, and Import Support' started by Luis, May 11, 2015.

  1. Luis

    Luis Well-Known Member

    I need a small help with the redirections for one importation. I need the rules to be inserted into the file .htaccess

    The links are:

    Old link vb http://www.my_domain.com/foro/index.php
    New link xf http://www.my_domain.com/foro/

    Old link vb http://www.my_domain.com/foro/todos.php
    New link xf http://www.my_domain.com/foro/forums/

    Old link vb http://www.my_domain.com/foro/normas-del-foro-158/
    New link xf http://www.my_domain.com/foro/forums/normas-del-foro.158/

    Old link vb http://www.my_domain.com/foro/normas-del-foro-158/normas-del-foro-mercado-aplicaci%F3n-11-03-2013-a-1271
    New link xf http://www.my_domain.com/foro/threads/normas-del-foro-mercado-aplicacion-11-03-2013.1271/

    Old link vb http://www.my_domain.com/foro/members/pistu-38/
    New link xf http://www.my_domain.com/foro/members/pistu.38/

    Old link vb http://www.my_domain.com/foro/members/list/
    New link xf http://www.my_domain.com/foro/members/

    Thank you for any help.

    Regards, Luis.
     
  2. imthebest

    imthebest Formerly Super120

  3. Luis

    Luis Well-Known Member

    @Super120 Although my English is very bad, I understand that this is not necessary for us. We just need to rewrite rules to redirect the old URLs to the new URLs.

    Regards, Luis.
     
  4. Amaury

    Amaury Well-Known Member

  5. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Add these rules to the top of the .htaccess file in the /foro directory (which should be XF's .htaccess file):

    Code:
    RewriteEngine On
    
    RewriteRule ^todos\.php$ forums/ [R=301,L]
    
    RewriteRule ^[^/]+-([0-9]+)/$ forums/$1/ [R=301,L]
    
    RewriteRule ^[^/]+/[^/]+-([0-9]+)$ threads/$1/ [R=301,L]
    
    RewriteRule ^members/[^/]+-([0-9]+)/$ members/$1/ [R=301,L]
    
    RewriteRule ^members/list/$ members/ [R=301,L]
    
     
    Luis likes this.
  6. Luis

    Luis Well-Known Member

    Hello,

    @Jake Bunce thanks for the redirections. Today we have made the importation, we're testing rewrite rules, but do not work, any help is welcome.

    Thanks and regards, Luis.
     
  7. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    I need to see an example. What is one of the old thread URLs? And what is the corresponding new URL that is should redirect to?
     
  8. Luis

    Luis Well-Known Member

    Thanks for the reply @Jake Bunce I am not the owner of the website, I do not want to make public the urls. I sent the information requested in a conversation.
     
  9. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Some of Google's thread links have ending slashes, so use this to allow for an ending slash:

    Code:
    RewriteEngine On
    
    RewriteRule ^todos\.php$ forums/ [R=301,L]
    
    RewriteRule ^[^/]+-([0-9]+)/$ forums/$1/ [R=301,L]
    
    RewriteRule ^[^/]+/[^/]+-([0-9]+)/?$ threads/$1/ [R=301,L]
    
    RewriteRule ^members/[^/]+-([0-9]+)/$ members/$1/ [R=301,L]
    
    RewriteRule ^members/list/$ members/ [R=301,L]
    
     
    Luis likes this.
  10. Luis

    Luis Well-Known Member

    Apologies for delay in the response.

    Thank you very much for your support @Jake Bunce everything is working properly now.

    Regards, Luis.
     

Share This Page