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
  #62  
Old 07-30-2001, 09:37 PM
fastforward fastforward is offline
 
Join Date: Oct 2001
Location: NC, USA
Posts: 399
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Gimme till tomorrow night and I'll redo the hack based on the 2.02 code and post full instructions. I'll use the 'double rewrite' method that porfiry contributed to avoid changing a bazillion templates

ThomasP: The /f12 bits are created by editing the templates. All the rewrite does is change those short urls back to something that the vB php code knows about.
Reply With Quote
  #63  
Old 07-30-2001, 09:55 PM
ThomasP
Guest
 
Posts: n/a
Default

oops, my bad - I see.
Thanks for your help and take your time,
-Tom
Reply With Quote
  #64  
Old 07-31-2001, 12:20 AM
auto auto is offline
 
Join Date: Nov 2001
Location: Los Angeles, CA
Posts: 85
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I finally got it to work by taking out the extra "/" from the first 2 lines, wooohooo!!!
Now I face smaller, yet another problem.

Take this page for example:
http://www.automotiveforums.com/vbulletin/t4667.html
The 2nd page of the thread will not be indexed by search engines

How can I use mod_rewrite to make the 2nd page be
http://www.automotiveforums.com/vbulletin/t4667-2.html
3rd page: http://www.automotiveforums.com/vbulletin/t4667-3.html... etc?

Thanks for any help.
Reply With Quote
  #65  
Old 07-31-2001, 02:58 PM
auto auto is offline
 
Join Date: Nov 2001
Location: Los Angeles, CA
Posts: 85
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well, I've done it!

http://www.automotiveforums.com/vbulletin/t4667.html

And click on page 2, 3, and 4

Thread [ << < 1 2 3 4 > >> ]

If there's anybody that wants the rewrite code for this I'll post it, it was easier than I thought, after twisting my head for 2 hours.
Reply With Quote
  #66  
Old 07-31-2001, 04:44 PM
fastforward fastforward is offline
 
Join Date: Oct 2001
Location: NC, USA
Posts: 399
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by auto
Well, I've done it!

http://www.automotiveforums.com/vbulletin/t4667.html

And click on page 2, 3, and 4

Thread [ << < 1 2 3 4 > >> ]

If there's anybody that wants the rewrite code for this I'll post it, it was easier than I thought, after twisting my head for 2 hours.
You didn't tell us you were doing it! I spent hours last night doing this Actually, 2.0.2 made it a little easier due to the change in the pagenav handling.

Mine appears to be working on IE, but I haven't tried every possible scenario and I haven't tested it on Netscape. It handles multipage threads, but I still need to add support for multi-page threadlistings. Once complete, you should be able to block spiders from all dynamic urls and still have them index ALL posts.

If anyone wants to help debug it, here it is:

----------------------------------------------

1) Edit /etc/httpd.conf
httpd.conf needs editing to enable and configure mod_rewrite. Here's all the relevent bits from my httpd.conf. It can go anywhere between the <VirtualHost> & </VirtualHost> tags.
RewriteEngine on
RewriteRule ^/f([0-9]+)/s([^/]+?)$ /forumdisplay.php?forumid=$1&s=$2 [L]
RewriteRule ^/t([0-9]+)/s([^/]+?)\.html$ /showthread.php?threadid=$1&s=$2 [L]
RewriteRule ^/s([^/])+?/$ /index.php?s=$1 [L]




2) Edit Templates
a. The following templates contain the forum links that need changing (one occurance in each)

-> forumdisplay_forumbit_level1_nopost
-> forumdisplay_forumbit_level1_post
-> forumdisplay_forumbit_level2_nopost
-> forumdisplay_forumbit_level2_post
-> forumhome_forumbit_level1_nopost
-> forumhome_forumbit_level1_post
-> forumhome_forumbit_level2_nopost
-> forumhome_forumbit_level2_post

The new link should be: <a href="$bburl/f$forum[forumid]/">$forum[title]</a>


b. The following template contains the thread link that needs changing:

-> forumdisplaybit

The new link should be: <a href="$bburl/t$thread[threadid].html">$thread[title]</a>


c. The following templates contain the pagenav bits:

-> forumdisplay_multipagenav_pagenumber

Replace the link within this templatewith:
$bburl/t$thread[threadid]-$acurpage.html

--------------------------------------------------------------
Reply With Quote
  #67  
Old 07-31-2001, 07:55 PM
auto auto is offline
 
Join Date: Nov 2001
Location: Los Angeles, CA
Posts: 85
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is what I added for the thread#-page#.html to work:

RewriteRule ^t([0-9]+)-([0-9]+)\.html$ showthread.php?threadid=$1&perpage=10&pagenumber=$ 2 [L]

Then I had to modify functions.php

You can find what to modify by finding the veriables that correspond to the page nav in the templates.
Reply With Quote
  #68  
Old 09-09-2001, 03:07 PM
Thomas P's Avatar
Thomas P Thomas P is offline
 
Join Date: Oct 2001
Location: Munich, DE
Posts: 365
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Has anyone managed to get that working via .htaccess?
If mod_rewrite is enabled it works as well via .htaccess - right?

At least that works on my account:
Code:
RewriteEngine on
RewriteBase /test/
RewriteRule   ^(.+)  http://www.mcseboard.de/$1  [R,L]
thx,
-Tom
Reply With Quote
  #69  
Old 09-11-2001, 06:33 AM
steven steven is offline
 
Join Date: Oct 2001
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Thomas P
Has anyone managed to get that working via .htaccess?
If mod_rewrite is enabled it works as well via .htaccess - right?

At least that works on my account:
Code:
RewriteEngine on
RewriteBase /test/
RewriteRule   ^(.+)  http://www.mcseboard.de/$1  [R,L]
thx,
-Tom
I would also like to know if anyone has managed to do this via .htaccess?
Reply With Quote
  #70  
Old 09-20-2001, 12:38 AM
TheComputerGuy's Avatar
TheComputerGuy TheComputerGuy is offline
 
Join Date: Oct 2001
Location: TX
Posts: 580
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

where can I find the htaccess that you speak of, I mean I looked all over my account and could not find it...
Reply With Quote
  #71  
Old 09-20-2001, 07:13 AM
Thomas P's Avatar
Thomas P Thomas P is offline
 
Join Date: Oct 2001
Location: Munich, DE
Posts: 365
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just create one...
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 09:54 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.06091 seconds
  • Memory Usage 2,314KB
  • 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
  • (2)bbcode_code
  • (2)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
  • (4)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
  • (10)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