PDA

View Full Version : VB 4 to 5 & VBseo


t-h-c
06-15-2016, 01:53 PM
Hi Everyone,

Have ran into a problem which is a right nightmare! any help would be much appreciated! need to upgrade to vb 5 and due to vbseo (100k posts all indexd currently) when upgrade happened it of course broke every existing url so we had to switch back....

How can we do this without causing a huge upset to 100k indexd posts ? and posts linkd from other sites etc...

Thanks in advance...

Paul M
06-15-2016, 02:59 PM
It depends on what url structure you used in vbseo, but generally the answer is you cannot do much at all, at least unless you are quite experienced in writing redirect rules, and even than, it still depends on that initial question (the url structure used).

TheLastSuperman
06-15-2016, 06:32 PM
I'd gather a set of URL examples from your current site, since vBSEO is not longer available, look for DB Tech's DBSEO instead and inquire with them directly on their site i.e. provide the URL examples to them and ensure they state those will work in DBSEO upon purchase etc. <-- that is if you want SEO done easily w/o any need for you making changes.

cellarius
06-16-2016, 05:01 AM
Depending on the vBSEO rules you used, it is not too hard to 301-rewrite them back to standard vB format (unless, of course, you choose to omit ids from your urls, then you're royally screwed). From there, vB5 should do the further redirect I think.

bridge2heyday
06-16-2016, 11:34 AM
You can easily 301 redirect to the new content URLs , even if you don't use ids in your url , you can use a small workaround to match url_ident .. it is not the perfect solution but just working fine .

cellarius
06-16-2016, 12:20 PM
Please explain. How do you redirect old thread urls without an id (without doing every thread manually, of course)?

bridge2heyday
06-16-2016, 01:19 PM
Well , this will require one or two file edits
in file 'includes/vb5/frontend/routing.php'
line 239 just before throwing
throw new vB5_Exception_404("invalid_page_url");
I have made some work
I used $path variable , exploded it and got the last element .. then queried node table for urlident equal to this value .
if true .. this returns node id
Then
$url = vB_Api::instanceInternal('route')->getAbsoluteNodeUrl($id);
header('Location: ' . $url, true, 301);
exit;

I did this for a client who converted from smf with pretty URLs and working fine
I will post the full code when I have access to my home PC tomorrow.
Note : if the URL doesn't end with '/' you have to do additional work in includes\api\interface\collapsed.php'

Paul M
06-16-2016, 06:35 PM
What exactly do you mean by "the urlident" ?

Replicant
06-16-2016, 08:34 PM
What exactly do you mean by "the urlident" ?

That would be the urlident column in the node table. It contains the hyphenated version of the text portion of the url and can be used successfully many times to compare to seo pretty urls.....

t-h-c
06-17-2016, 10:31 AM
Excellent thank you very much bridge2heyday it worked!!

Final problem though...as this is on a main domain ie domain.com/forum how do we prevent it creating /forum/forum, I noticed even does this on VB site this is the final hurdle.

Replicant
06-17-2016, 11:29 AM
Excellent thank you very much bridge2heyday it worked!!

Final problem though...as this is on a main domain ie domain.com/forum how do we prevent it creating /forum/forum, I noticed even does this on VB site this is the final hurdle.

You can change the URL in site builder for each. I did this on my forum. It may seem like a lot of work, but after you have done a few, they go quickly. I think I have like 60 forums and sub forums and it took like 1 - 1 1/2 hours to change all the urls.

bridge2heyday
06-17-2016, 11:56 AM
That would be the urlident column in the node table. It contains the hyphenated version of the text portion of the url and can be used successfully many times to compare to seo pretty urls.....
Exactly

cellarius
06-17-2016, 11:59 AM
That would be the urlident column in the node table. It contains the hyphenated version of the text portion of the url and can be used successfully many times to compare to seo pretty urls.....
Ah, that's specific to vB5. I'm not really familiar with that version. For vB4 I would stick to my royally screwed thesis, though ;)

bridge2heyday
06-17-2016, 12:15 PM
Excellent thank you very much bridge2heyday it worked!!

Final problem though...as this is on a main domain ie domain.com/forum how do we prevent it creating /forum/forum, I noticed even does this on VB site this is the final hurdle.

Thanks ,
you have something installed in the root of your site ?
and you have your forum installed in sub directory /forum ?
anyway,
I will give you a scenario where I have forums installed in subdir /forums

assume you have domain www.domain.com
and vbulletin at www.domain.com/forums

in your admincp change vBulletin URL to www.domain.com instead of www.domain.com/forums
and then use this .htaccess

RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?domain.com$
RewriteCond %{REQUEST_URI} !^/forums/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /forums/$1

Tricky but working fine :)

Note : this will not work if your directory is /forum , you can rename in that case

--------------- Added 1466173770 at 1466173770 ---------------

Ah, that's specific to vB5. I'm not really familiar with that version. For vB4 I would stick to my royally screwed thesis, though ;)
Yes , we are in vb5 discussion forum :D

Paul M
06-17-2016, 03:07 PM
Yes , we are in vb5 discussion forum :D
True, however your question was about vB4 to vB5, so somewhat relevant to vB4 as well.

bridge2heyday
06-17-2016, 03:43 PM
True, however your question was about vB4 to vB5, so somewhat relevant to vB4 as well.
You are right , but this wasn't my question

t-h-c
06-18-2016, 07:23 AM
Thanks ,
you have something installed in the root of your site ?
and you have your forum installed in sub directory /forum ?
anyway,
I will give you a scenario where I have forums installed in subdir /forums

assume you have domain www.domain.com
and vbulletin at www.domain.com/forums

in your admincp change vBulletin URL to www.domain.com instead of www.domain.com/forums
and then use this .htaccess

RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?domain.com$
RewriteCond %{REQUEST_URI} !^/forums/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /forums/$1

Tricky but working fine :)

Note : this will not work if your directory is /forum , you can rename in that case

--------------- Added 1466173770 at 1466173770 ---------------


Yes , we are in vb5 discussion forum :D

Thanks a ton for the advice! although just ran into a final issue....after we updated VB url from domain.com/forums (VB installed dir) to domain.com i am not able to access to admincp and the forum breaks (links to css and images dont work) do you have any ideas? thank you

bridge2heyday
06-18-2016, 07:40 AM
This rule should be in root .htaccess not vbulletin .htaccess

karlm
07-17-2016, 08:24 PM
Well , this will require one or two file edits
in file 'includes/vb5/frontend/routing.php'
line 239 just before throwing
throw new vB5_Exception_404("invalid_page_url");I have made some work
I used $path variable , exploded it and got the last element .. then queried node table for urlident equal to this value .
if true .. this returns node id
Then
$url = vB_Api::instanceInternal('route')->getAbsoluteNodeUrl($id); header('Location: ' . $url, true, 301);exit;I did this for a client who converted from smf with pretty URLs and working fine
I will post the full code when I have access to my home PC tomorrow.
Note : if the URL doesn't end with '/' you have to do additional work in includes\api\interface\collapsed.php'

Would you mind elaborating on the last portion of your above quote? I had VBSEO on VB4 and it worked like a charm, inc. all the extra toys it gave - such a shame they folded up :(

Anyway, I had a url alike to: http://mysite.com/forum-name/thread-title-123.html

i.e. there was no trailing /

RichieBoy67
07-17-2016, 10:28 PM
##Just something to think about:

The rewrites will redirect people who find your old urls to your new ones but will do nothing for seo and may actually do harm. I believe the best method for seo would be a permanent 301 redirect.

If you want an easy solution DragonByte Seo (http://www.dragonbyte-tech.com/?referrerid=11513) would work and will add all the redirects, etc. I do not believe they have a version for Vb5 yet though.

DouglasUK
08-17-2016, 10:15 AM
Well , this will require one or two file edits
in file 'includes/vb5/frontend/routing.php'
line 239 just before throwing
throw new vB5_Exception_404("invalid_page_url");
I have made some work
I used $path variable , exploded it and got the last element .. then queried node table for urlident equal to this value .
if true .. this returns node id
Then
$url = vB_Api::instanceInternal('route')->getAbsoluteNodeUrl($id);
header('Location: ' . $url, true, 301);
exit;

I did this for a client who converted from smf with pretty URLs and working fine
I will post the full code when I have access to my home PC tomorrow.
Note : if the URL doesn't end with '/' you have to do additional work in includes\api\interface\collapsed.php'
Is there any chance you could post your query, too, please? I am new to programming vb5 and while I could work it out, you know how many days that could take me over simply seeing what you are doing and learning the quick way. So, if you have the full code for your solution, that would be ideal.