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

XF 1.2 Internal links not working after import

Janmaat

Active member
#1
Now I imported my old vB to XF and i'm quite happy now :) BUT....

In many many posts I have internal links directing to other posts in my forum. But as these links are text inside of posts they are still showing the old vB URL structure. When clicking these links it always directs me to old vB posts not to new XF posts.

How can I find and change these internal links so that the point to right XF posts?
 

JulianD

Well-known member
#2
The recommended method is to install the redirect scripts for vBulletin. After you do it, it doesn't matter if your messages still has the old links, they will be redirected to the new links :)
 

Janmaat

Active member
#3
Thanks so far @JulianD :)

But how do i do that? Do I need a kind of rewrite rule in a htaccess file because the imported IDs are the same...

My previous vB links:
Point to post: http://www.meinforum.de/forum/showthread.php/4494-bla-bla-bla/page3?p=103248#post103248
Point to thread: http://www.meinforum.de/forum/showthread.php/240-bla-bla-bla

My current XF links:
Point to post: http://www.meinforum.de/onboard/threads/bla-bla-bla.4494/page-3#post-103248
Point to thread: http://www.meinforum.de/onboard/threads/bla-bla-bla.240/
 

JulianD

Well-known member
#4
Thanks so far @JulianD :)

But how do i do that? Do I need a kind of rewrite rule in a htaccess file because the imported IDs are the same...

My previous vB links:
Point to post: http://www.meinforum.de/forum/showthread.php/4494-bla-bla-bla/page3?p=103248#post103248
Point to thread: http://www.meinforum.de/forum/showthread.php/240-bla-bla-bla

My current XF links:
Point to post: http://www.meinforum.de/onboard/threads/bla-bla-bla.4494/page-3#post-103248
Point to thread: http://www.meinforum.de/onboard/threads/bla-bla-bla.240/
That's right. Take a look at this:

http://xenforo.com/community/resources/vbulletin-4-x-url-redirection.120/
 

Janmaat

Active member
#5
@Jake Bunce
Could you help me out what exactly I have to put in my htaccess file for the above specific URLs? As the IDs are the same I guess I don't need redirect scripts, right?

I'm totally lost with this :(
 

Jake Bunce

XenForo moderator
Staff member
#6
Thanks so far @JulianD :)

But how do i do that? Do I need a kind of rewrite rule in a htaccess file because the imported IDs are the same...

My previous vB links:
Point to post: http://www.meinforum.de/forum/showthread.php/4494-bla-bla-bla/page3?p=103248#post103248
Point to thread: http://www.meinforum.de/forum/showthread.php/240-bla-bla-bla

My current XF links:
Point to post: http://www.meinforum.de/onboard/threads/bla-bla-bla.4494/page-3#post-103248
Point to thread: http://www.meinforum.de/onboard/threads/bla-bla-bla.240/
Add this to the top of the .htaccess file in your old /forum directory:

Code:
RewriteEngine On

RewriteCond %{QUERY_STRING} (^|\?)p=([0-9]+)$
RewriteRule ^showthread\.php /onboard/posts/%2/? [R=301,L]

RewriteRule ^showthread\.php/([0-9]+)- /onboard/threads/$1/? [R=301,L]
 

Janmaat

Active member
#7
Hi @Jake Bunce
I knew you would know the answer (y)

But I have some headache with "old /forum directory" :notworthy:

In my server root I have two folders for my old vB install and for the new XF install.

/root
|_/html
|_/forumvb
|_/forum​
|_/forumxf
|_/onboard​

vB: This directs to /html/forumvb/forum:
Code:
http://www.meinforum.de/forum/showthread.php/240-bla-bla-bla
XF: This directs to /html/forumxf/onboard:
Code:
http://www.meinforum.de/onboard/threads/bla-bla-bla.240
The folder /forumvb will be deleted as I do not longer need the old vB install.

So I'm bit confused where I'll have to place the .htaccess that you have suggested as above :barefoot:
 

Jake Bunce

XenForo moderator
Staff member
#8
The folder /forumvb will be deleted as I do not longer need the old vB install.

So I'm bit confused where I'll have to place the .htaccess that you have suggested as above :barefoot:
That is a problem. You should leave the directory there to facilitate rewrites. Or recreate that web root elsewhere and install the rewrites there.
 

Janmaat

Active member
#9
I had to create a subfolder /forum in /forumxf/onboard and put the .htaccess there. Now the redirects work like a charme :)

|_/forumxf
|_/onboard
|_/forum​

Thank you very much for your superior support @Jake Bunce (y):)