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

XF 1.5 Suffering from 404 Errors After Migrated from VBulletin 5

Discussion in 'XenForo Questions and Support' started by bibitbunga, Jan 13, 2016.

  1. bibitbunga

    bibitbunga Member

    Hi all

    My forum is www.kebunpedia.com, and right now we are suffering from terrible issue: 404 not found everywhere, literally :(

    We just moved from VBulletin 5 (there was a lot of bugs and errors) to XenForo.

    Our users can not be any happier that this decision has made, obviously XF is loved by everyone!

    But uh oh, I have a problem with the old url and can do nothing about that. The urls and index from VB5 are soo complicated and I do not find any solution to redirect all my urls in Google Search Console.

    As a result, we got dropped in search clicks and might be in Google Ranking. We do not rank any more in certain keywords due to the 404 error. All is error if they come from google. Here is the screenshoot from Google:


    And I used Four oh Four addon to help better 404 detection, here is the result:


    I have been stressed out for 3 days now.. I read at Google that 404s do not hurt my site but what happened if all urls in my site are not found aka Big Problem of 404 errors :(

    Please help me, please help suggest the way out of this problem..

    Thank you a lot..
  2. melbo

    melbo Well-Known Member

    bibitbunga likes this.
  3. bibitbunga

    bibitbunga Member

    Hi @melbo thanks for your reply. How does this work, do I need to start conversation with @Jake Bunce or how? Sorry I am newbie..

    Thank you

    Updated: I have started conversation with @Jake Bunce, I hope he is able to help me. Thank you very much @melbo you have been our angel :)
  4. melbo

    melbo Well-Known Member

    Jake's a url redirect wizard :)
    bibitbunga likes this.
  5. bibitbunga

    bibitbunga Member

    thank you! I need that black magic :D
  6. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    To be certain I need you to provide some example old and new URLs for forums, threads, and members.

    Was vB installed in the web root? I can XF currently is.
  7. bibitbunga

    bibitbunga Member

    Yes vBulletin was installed in the web root, like how XF is installed now. I just replaced the VB system to XF system.

    Okay here are some examples of the old and new URL for:

    Thank you
  8. bibitbunga

    bibitbunga Member

  9. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Ok. For your thread / member redirects...

    ...add these rules to the top of the .htaccess file in your web root:

    RewriteEngine On
    RewriteRule ^forum/[^/]+/([0-9]+)-.*$ /showthread.php?t=$1 [R=301,L]
    RewriteRule ^member/([0-9]+)-.*$ /member.php?u=$1 [R=301,L]
    Then upload these redirect scripts to your web root:


    You might need to edit the 301config.php file to specify the name of your import_log table in the XF database. This table is usually named one of these things:


    Note that I didn't include any rule for your forum redirects. Your forum URLs don't appear to use ids so a generic redirect is not possible. But the important thing is threads.
  10. bibitbunga

    bibitbunga Member

    EDITED: some works flawless! some redirected to homepage. Great Job thank you @Jake Bunce


    Thanks for your reply @Jake Bunce

    I have done these steps:

    1. implemented your code to my htaccess (top above all other code),
    2. download the zip file of redirection scripts for vbulletin 3x264
    3. unzip to my hard drive
    4. upload all the extracted files (include 1 folder) to public_html root
    5. change the 301config.php ->> the part I changed is shown in the picture below:


    As my database has xf_import_log in it.

    And I have tested, the result is all the 404 error redirected back to home www.kebunpedia.com

    They all redirect to homepage, not to proper new url.. what have I missed?

    Thank you..
    Last edited: Jan 14, 2016
  11. bibitbunga

    bibitbunga Member

    Hey, it works well now! Only some threads url that redirected to the homepage. This does not matter a lot. I do not know why are some thread urls redirected to homepage, but @Jake Bunce you really really help me out here.

    Thank you for saving my life. Appreciate the XF staffs, you are awesome!
  12. bibitbunga

    bibitbunga Member

  13. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    When it redirects to the homepage that means the source thread id doesn't exist in the import_log table.
  14. bibitbunga

    bibitbunga Member

    so there's nothing to do about it? if so then I have done my best, hopefully Google will not penalize my site :D

    thank you Jake!
  15. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    In that situation the only worry is that you might be using the wrong import_log table. Look for other log tables that might be more complete. Normally the name will be one of these:

  16. Mr Lucky

    Mr Lucky Well-Known Member

    You should be fine. The main issues are external links pointing to individual pages and internal links pointing to individual pages (usually threads).

    Once you have both redirecting via 301 all is fine but can be improved because Google does take away a bit of a link's value when it is redirected.

    So even now jake has done a great job on the 301s I would recommend you try to search out internal redirects and manually change them (Can be a big job) No big deal if you don't but it may help a bit.

    Same with external links to your site. ideally contact the site owner and ask for them to change it to the correct page.

    I can always take time for Google to pick up the new URL, so don't panic if it takes weeks or even months.

    One useful tool I recently found was this xenforo dead link remover:


    It will can remove any dead links from your site. Not crucial but it can make a better user experience which is, as we know, a big plus in Google.

    It will also help you identify an dead (404) internal links (must fix these) and internal 301s (ideally fix as above)
    bibitbunga likes this.
  17. bibitbunga

    bibitbunga Member

    Thank you a lot i will definitely check the dead link management tools. Thank you a lot :D

    I have ctrl+F "import_log" in my phpmyadmin and found out it is the only one. I have used that. so no better luck for me eh. But it is very lucky to have solution from you thank you very much
  18. Steve8383

    Steve8383 New Member

    @Jake Bunce Hope you can help

    Having problems too here, after a VB 3.8 import to XenForo.

    My XF Forum is now on the same url I used to use for my VB forum:

    Once I went live with XF I moved the VB forum to:

    I did create an import log table but I don't know how to reference it, or where it is located. I did download the VB 3.8 redirection script and uploaded it to the new VB location. All my old url's are giving 404's

    Example 1 for a thread:
    Old url:

    Equivalent new XF url:

    Example 2 for specific forum:

    Old url:

    New url:
  19. Steve8383

    Steve8383 New Member

  20. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    "forums" is the route in that case. You can rename a route but not remove it.

    The id can be removed from a forum URL by specify a node name:

    Admin CP -> Applications -> Display Node Tree -> [click the node] -> URL Portion

Share This Page