Go Back   vb.org Archive > vBulletin 5 Connect Discussion > vB5 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #11  
Old 06-17-2016, 11:29 AM
Replicant's Avatar
Replicant Replicant is offline
 
Join Date: Sep 2014
Location: Phoenix, Az. USA
Posts: 485
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by t-h-c View Post
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.
Reply With Quote
  #12  
Old 06-17-2016, 11:56 AM
bridge2heyday's Avatar
bridge2heyday bridge2heyday is offline
 
Join Date: Aug 2014
Location: Egypt
Posts: 141
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Replicant View Post
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
Reply With Quote
  #13  
Old 06-17-2016, 11:59 AM
cellarius's Avatar
cellarius cellarius is offline
 
Join Date: Aug 2005
Posts: 1,987
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Replicant View Post
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
Reply With Quote
  #14  
Old 06-17-2016, 12:15 PM
bridge2heyday's Avatar
bridge2heyday bridge2heyday is offline
 
Join Date: Aug 2014
Location: Egypt
Posts: 141
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by t-h-c View Post
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

PHP Code:
RewriteEngine on
RewriteCond 
%{HTTP_HOST} ^(www.)?domain.com$
RewriteCond %{REQUEST_URI} !^/forums/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond 
%{REQUEST_FILENAME} !-d
RewriteRule 
^(.*)$ /forums/$
Tricky but working fine

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

--------------- Added [DATE]1466173770[/DATE] at [TIME]1466173770[/TIME] ---------------

Quote:
Originally Posted by cellarius View Post
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
Reply With Quote
  #15  
Old 06-17-2016, 03:07 PM
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Location: Nottingham, UK
Posts: 23,748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by bridge2heyday View Post
Yes , we are in vb5 discussion forum
True, however your question was about vB4 to vB5, so somewhat relevant to vB4 as well.
Reply With Quote
  #16  
Old 06-17-2016, 03:43 PM
bridge2heyday's Avatar
bridge2heyday bridge2heyday is offline
 
Join Date: Aug 2014
Location: Egypt
Posts: 141
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Paul M View Post
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
Reply With Quote
  #17  
Old 06-18-2016, 07:23 AM
t-h-c t-h-c is offline
 
Join Date: Feb 2010
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by bridge2heyday View Post
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

PHP Code:
RewriteEngine on
RewriteCond 
%{HTTP_HOST} ^(www.)?domain.com$
RewriteCond %{REQUEST_URI} !^/forums/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond 
%{REQUEST_FILENAME} !-d
RewriteRule 
^(.*)$ /forums/$
Tricky but working fine

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

--------------- Added [DATE]1466173770[/DATE] at [TIME]1466173770[/TIME] ---------------


Yes , we are in vb5 discussion forum
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
Reply With Quote
  #18  
Old 06-18-2016, 07:40 AM
bridge2heyday's Avatar
bridge2heyday bridge2heyday is offline
 
Join Date: Aug 2014
Location: Egypt
Posts: 141
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This rule should be in root .htaccess not vbulletin .htaccess
Reply With Quote
  #19  
Old 07-17-2016, 08:24 PM
karlm's Avatar
karlm karlm is offline
 
Join Date: Jul 2006
Location: England
Posts: 447
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by bridge2heyday View Post
Well , this will require one or two file edits
in file 'includes/vb5/frontend/routing.php'
line 239 just before throwing
PHP Code:
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
PHP Code:
$url vB_Api::instanceInternal('route')->getAbsoluteNodeUrl($id); header('Location: ' $urltrue301);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 /
Reply With Quote
  #20  
Old 07-17-2016, 10:28 PM
RichieBoy67's Avatar
RichieBoy67 RichieBoy67 is offline
 
Join Date: Apr 2004
Location: CT - Down in a hole..
Posts: 3,057
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

##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 would work and will add all the redirects, etc. I do not believe they have a version for Vb5 yet though.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:33 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.11888 seconds
  • Memory Usage 2,284KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (4)bbcode_php
  • (9)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete