Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: , by fastforward fastforward is offline
Developer Last Online: Nov 2011 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 05-24-2001 Last Update: Never Installs: 35
 
No support by the author.

For vB 2.0

This little hackette is a quick fix to allow search engine bots to spider your threads.

Although this will allow the bots to index every thread on your site, it will not make the threads 'search engine optimized'. They will see exactly what you see when you visit your site. It simply removes the CGI bits from the URL's which prevents most search engine bots from spidering more than one level deep.

If you want a hack that allows to fully customize how the thread will look to the search engine bot, you should look at Overgrows more complete hack here.

The advantage of this hack over Overgrows is that it does not require htaccess support which can have performance issues. This could also be seen as a disadvantage though as my hack requires that you have mod_rewrite enabled on your Apache Server, whereas Overgrows method should work with just about any web host out there.

Take yer pick

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #312  
Old 01-29-2004, 08:53 PM
Logikos Logikos is offline
 
Join Date: Jan 2003
Posts: 2,924
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks, can this hack be used with just moding the .htaccess file only?
Reply With Quote
  #313  
Old 01-29-2004, 09:26 PM
NTLDR's Avatar
NTLDR NTLDR is offline
Coder
 
Join Date: Apr 2002
Location: Bristol, UK
Posts: 3,644
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm pretty sure it can, but I've never used it.
Reply With Quote
  #314  
Old 01-29-2004, 10:33 PM
Logikos Logikos is offline
 
Join Date: Jan 2003
Posts: 2,924
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Anyone know how we would be able to use this with just the .htaccess file? I would love to have this hack on my boards, been seeing some great responds.
Reply With Quote
  #315  
Old 02-04-2004, 11:26 PM
iceman11111 iceman11111 is offline
 
Join Date: Feb 2003
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Help!!!

I have installed all of the additions to this great hack, but I have one major problem!

When I goto Update my counters, I get a an error, trying to "Update Thread Info"

I get this

Database error in vBulletin Control Panel 2.2.9:

Invalid SQL: UPDATE thread SET lastpost=1055471230,replycount=9,postusername='tla ne', postuserid='2575', lastposter='GYMBRAT',attach= WHERE threadid=1999
mysql error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE threadid=1999' at line 1

mysql error number: 1064

Date: Wednesday 04th of February 2004 06:26:13 PM
Script: http://www.intense-training.com/foru...dmin/misc.php3
Referer: http://www.intense-training.com/foru...ction=chooser&
Reply With Quote
  #316  
Old 03-12-2004, 12:12 PM
eva2000's Avatar
eva2000 eva2000 is offline
 
Join Date: Oct 2001
Location: Brisbane, Australia
Posts: 577
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by buro9
OK, this is for eva2000 and then I'll go through what I'm doing to keep all my links lovely

In your forum directory, set up your .htaccess to contain the following:
Code:
RewriteRule ^f([0-9]+)\/s$ forumdisplay.php?f=$1 [R=301]
RewriteRule ^t([0-9]+)\/s\.html$ forumdisplay.php?f=$1 [R=301]
Let me explain each part of those rules... well... one of them:

RewriteRule ARG1 ARG2 ARG3= If the URL requested matches the first arg, perform the second arg accord to the rules of the final arg.

ARG1 = Regular expression to match. In our case, ^f([0-9+])\/s$ where ^ = start of line, ([0-9]+ ) = 1 or more numbers, \/ = escaped forward slash (has to be escaped within a regexp), $ = end of line.

ARG2 = URL to request instead. In our case we also include $1 which is the first matching part of the regexp in ARG1 which is the number... the forumId.

ARG3 = Rule to dictate how to handle the ARG2 URL... [L] would bring it inline (leave the browser URL as it is and force the URL to the output stream without redirect)... I'm using [R=301] which is to send back a http 301 error which is "Moved Permanently"... I do this as I want Google and search engines to update all of their links over time and quite hitting the legacy ones.

So that's your solution eva Though do bug me if I screwed that up... I've only just finally got round to it... and the 301 error may require a fully qualified URL and not a relative one.



Anyhow... this is now to help the people who are NOT upgrading their VB2 but, are doing a fresh install of VB3 at a new URL and are archiving their VB2. I'm not sure how many of these there will be... but our forum quite enjoys the zest of occassional re-births... and it will help to ensure that our VB3 threads are truly threaded from day 1.

So... I've got this URL at the moment:

http://www.bowlie.com/forum/

And I'm moving that forum to:

http://www.bowlie.com/2003/

And putting VB3 on the /forum/ URL.

Yes I have lots of VB licenses

Anyhow... I want all t*.html links to go through to the archived forum... to keep all of the search engine results valid.

And I want all of the f*.html links to go through to the new forums on the new board.

The threads are easy to map:

Code:
	#
	# Legacy thread redirects
	#
RewriteRule ^t([0-9]+)\.html$ http://www.bowlie.com/forum/showthread.php?threadid=$1 [R=301]
RewriteRule ^t([0-9]+)-([0-9]+)-([0-9]+)\.html$ http://www.bowlie.com/forum/showthread.php?threadid=$1&perpage=$2&pagenumber=$3 [R=301]
RewriteRule ^t([0-9]+)-([0-9]+)--(.*)--([0-9]+)\.html$ http://www.bowlie.com/forum/showthread.php?threadid=$1&perpage=$2&highlight=$3&pagenumber=$4 [R=301]
But the forums are harder.

The forumid's on both the old and new sites are different... so what was forumid = 4 on VB2 is now forumid = 11 on VB3. So I need a map to track these and then set up all of the RewriteRules.

I've created a javascript array of the forumids... where the first value is the VB2 forumid, and the second value is the VB3 forumid.

Some forums won't exist on my VB3 site... so those links will go through to the archive too.

I've then created a simple bit of JavaScript which when run from Internet Explorer (doesn't work in Mozilla as that is standards compliant ) will produce my rewriterules for me:

Code:
<script type="text/javascript">
var forums = new Array(
  new Array('16','21'),
  new Array('17','22'),
  new Array('29',''),
  new Array('33','29'),
  new Array('4','11'),
  new Array('30',''),
  new Array('27','')
);

var html = "";

var oldForumUrl = "http://www.bowlie.com/2001/";
var newForumUrl = "http://www.bowlie.com/forum/";

for (var ii = 0; ii < forums.length; ii++) {
  if (forums[ii][1] == '') {
    // Link to archive
		html += "RewriteRule ^f" + forums[ii][0] + "\\.html$ " + oldForumUrl + "forumdisplay.php?f=" + forums[ii][0] + " [R=301]\n";
    html += "RewriteRule ^f" + forums[ii][0] + "--.*\\.html$ " + oldForumUrl + "forumdisplay.php?f=" + forums[ii][0] + " [R=301]\n";
  } else {
    // Link to new
		html += "RewriteRule ^f" + forums[ii][0] + "\\.html$ " + newForumUrl + "forumdisplay.php?f=" + forums[ii][1] + " [R=301]\n";
    html += "RewriteRule ^f" + forums[ii][0] + "--.*\\.html$ " + newForumUrl + "forumdisplay.php?f=" + forums[ii][1] + " [R=301]\n";
  }
}

document.write("<plaintext>" + html);

</script>
Obviously modify the URLs as applicable to you.

The output can then be pasted into your .htaccess and you will have:

Legacy forum URLs for forums that exist on your new VB going to VB3
Legacy forum URLs for forums that don't exist on your new VB going to VB2
Legacy thread URLs going to your VB2

Google would start spidering your new VB3 links pretty soon, including the new thread ones.

Now... if all of that went straight over your head... just ignore it and don't do any of it It's there to help other users that like me have installed this hack widely, indexed heavily by Google and are choosing to have a fresh VB3 and archive their VB2... that may be no-one else here... in which case... ignore this
thanks buro9, sorry for the late reply my forum's server was down due to hardware failure since Jan 31
Reply With Quote
  #317  
Old 03-12-2004, 03:26 PM
gmarik's Avatar
gmarik gmarik is offline
 
Join Date: May 2002
Location: Mocsow
Posts: 1,288
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This one would be good for vB3 ...
Reply With Quote
  #318  
Old 04-20-2004, 08:41 AM
Haakon Haakon is offline
 
Join Date: Nov 2001
Posts: 34
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I agree, I really miss this hack. 300 extra guests are allways welcome you know , ANYONE successfully implemented this hack on vb3?
Reply With Quote
  #319  
Old 04-21-2004, 04:35 PM
DenzoForums DenzoForums is offline
 
Join Date: Apr 2004
Posts: 73
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This looks cool.. I would like to install tis for VB 3.0.1. when or if it's available.

Dave
Reply With Quote
  #320  
Old 04-21-2004, 11:46 PM
lierduh lierduh is offline
 
Join Date: Jan 2003
Location: Sydney, Australia
Posts: 459
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Please understand, there is no need for VB3 to have this hack.

The Archive system is designed to feed the robots. Besides the main forums are indexed by Googles etc due to the removal of session ID from the URL. The script detects spiders by its user agent and disables the session ID if found.

If anything, one might want to shorten the Archive's URL to potentially increase the ranking. eg.

/archive/index.php/f-35.html

to

/arc/f-35.html

This can be easily achieved by using rewrites.
Reply With Quote
  #321  
Old 04-21-2004, 11:56 PM
DenzoForums DenzoForums is offline
 
Join Date: Apr 2004
Posts: 73
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

My archives are not working.. not vbulletin problem, but apparently the sever i am hosted on doesn;t support some feature for that to work. Is there anything else i can do?
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 03:46 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05313 seconds
  • Memory Usage 2,323KB
  • Queries Executed 25 (?)
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
  • (3)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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_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