• 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

#1
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..
 

Liam W

Well-known member
#2
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
 

Slavik

XenForo moderator
Staff member
#5
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);