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

XF 1.2 vbseo redirect stop working

Discussion in 'Installation, Upgrade, and Import Support' started by thiaago13, Jan 14, 2014.

  1. thiaago13

    thiaago13 Member

    not working..
    my .htaccess at old url/forum:

    RewriteEngine On
    RewriteRule [^/]+/([\d]+)-.+-([\d]+).html http://www.newurlexample.com/forum/showthread.php?t=$1&page=$2 [R=301,L]
    RewriteRule [^/]+/([\d]+)-.+.html http://www.newurlexample.com/forum/showthread.php?t=$1 [R=301,L]

    example:

    old url VBSEO: http://www.oldurlexample.com/forum/test-forums/2356115-test-thread-a.html

    not redirect to new url:

    http://www.newurlexample.com/forum/topico/test-thread.2356115/

    redirect to homepage:

    http://www.newurlexample.com/forum/

    i use this script:
    http://xenforo.com/community/threads/vbulletin-4-x-url-redirection.26935/

    everything was working perfectly, but I cleared accidentally the table "import_log" and stopped working

    help please..
     
  2. Liam W

    Liam W Well-Known Member

    Nothing you can do, you did need the import_log table to make it work.

    You might be able to make something, as the old URL has the content ID, but I wouldn't know how.

    Liam
     
  3. thiaago13

    thiaago13 Member

    did not know that this table was really important
     
  4. Jeremy

    Jeremy XenForo Moderator Staff Member

    If you have a recent back up of your database, you should be able to restore the import_log table.
     
  5. Slavik

    Slavik XenForo Moderator Staff Member

    You maintained the same ids?

    If so, run these queries.

    Code:
    INSERT INTO xf_import_log (content_type, old_id, new_id) SELECT 'user', user_id, user_id FROM xf_user ON DUPLICATE KEY UPDATE old_id = VALUES(old_id) ");
    INSERT INTO xf_import_log (content_type, old_id, new_id) SELECT 'userGroup', user_group_id, user_group_id FROM xf_user_group ON DUPLICATE KEY UPDATE old_id = VALUES(old_id);
    INSERT INTO xf_import_log (content_type, old_id, new_id) SELECT 'post', post_id, post_id FROM xf_post ON DUPLICATE KEY UPDATE old_id = VALUES(old_id);
    INSERT INTO xf_import_log (content_type, old_id, new_id) SELECT 'thread', thread_id, thread_id FROM xf_thread ON DUPLICATE KEY UPDATE old_id = VALUES(old_id);
    INSERT INTO xf_import_log (content_type, old_id, new_id) SELECT 'poll', poll_id, poll_id FROM xf_poll ON DUPLICATE KEY UPDATE old_id = VALUES(old_id);
    INSERT INTO xf_import_log (content_type, old_id, new_id) SELECT 'node', node_id, node_id FROM xf_node ON DUPLICATE KEY UPDATE old_id = VALUES(old_id);
    INSERT INTO xf_import_log (content_type, old_id, new_id) SELECT 'attachment', attachment_id, attachment_id FROM xf_attachment ON DUPLICATE KEY UPDATE old_id = VALUES(old_id);
    INSERT INTO xf_import_log (content_type, old_id, new_id) SELECT 'conversation', conversation_id, conversation_id FROM xf_conversation_master ON DUPLICATE KEY UPDATE old_id = VALUES(old_id);
    
     

Share This Page