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
  #52  
Old 07-29-2001, 12:03 PM
ThomasP
Guest
 
Posts: n/a
Default

Quote:
Originally posted by steven
I was wondering how I would change the above code to reflect my forums directory which is not run as root, but is run as http://www.mydomain.com/forums

Any Help is greatly appreciated.
Steven
http://www.vbulletin.com/forum/showt...210#post114210
Reply With Quote
  #53  
Old 07-29-2001, 12:51 PM
ThomasP
Guest
 
Posts: n/a
Default

Fantastic hack! But I have some problems:

Okay, a.m. fastforward's hint works for me,
but I have problems with rewriting in general as it seems.

This is my .htaccess on Apache 1.3.20 placed in the root dir.

Code:
RewriteEngine on
RewriteRule ^forum/f([0-9]+)/s([^/]*)/$ /forumdisplay.php?forumid=$1&s=$2 [L]
RewriteRule ^forum/t([0-9]+)/s([^/]*)/thread\.html$ /showthread.php?threadid=$1&s=$2 [L]
RewriteRule ^forum/[ft]([0-9]+)/s([^/]*)/(.+)$ /$3 [L]

# Testing
RewriteRule ^forum/foo/(.*)$ /bar/index.html [R]
Test:

http://mcseboard.de/forum/foo/

is rewritten to

http://mcseboard.de/bar/index.html


So, rewrites seem to work - just try the link.
But my board behaves as usual making no notice of the rules as it seems.
What's going wrong here?

Thanks for any hint,
-Tom

P.S.: I don't have access to httpd.conf or the RewriteLog if there is...
Reply With Quote
  #54  
Old 07-29-2001, 01:07 PM
auto auto is offline
 
Join Date: Nov 2001
Location: Los Angeles, CA
Posts: 85
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is what i have in my .htaccess in the root directory:

Quote:
RewriteEngine on
RewriteRule ^vbulletin/f([0-9]+)/s([^/]*)/$ /forumdisplay.php?forumid=$1&s=$2 [L]
RewriteRule ^vbulletin/t([0-9]+)/s([^/]*)/thread\.html$ /showthread.php?threadid=$1&s=$2 [L]
RewriteRule ^vbulletin/[ft]([0-9]+)/s([^/]*)/(.+)$ /$3 [L]
and the rule does not appear to work

My vB is here: http://www.automotiveforums.com/vbulletin/index.php

any help would be appreciated.
Reply With Quote
  #55  
Old 07-29-2001, 01:18 PM
ThomasP
Guest
 
Posts: n/a
Default

Hi,

does rewriting work in general?

Try to test it with something like
RewriteRule ^vbulletin/foo/(.*)$ /bar/index.html [R]

Enter http://yourdomain/vbulletin/foo/

Rewriting works for me in general, but the board doesn't seem
to be affected...
-Tom
Reply With Quote
  #56  
Old 07-29-2001, 06:12 PM
auto auto is offline
 
Join Date: Nov 2001
Location: Los Angeles, CA
Posts: 85
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

RewriteRule ^vbulletin/foo/(.*)$ /index.php [R]

that works,
when you go to http://www.automotiveforums.com/vbulletin/foo/
it directs you to the index page.
Reply With Quote
  #57  
Old 07-29-2001, 08:03 PM
ThomasP
Guest
 
Posts: n/a
Default

Then we seem to have the same problem...
Reply With Quote
  #58  
Old 07-29-2001, 09:52 PM
auto auto is offline
 
Join Date: Nov 2001
Location: Los Angeles, CA
Posts: 85
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sure does look like it.
Reply With Quote
  #59  
Old 07-29-2001, 10:06 PM
fastforward fastforward is offline
 
Join Date: Oct 2001
Location: NC, USA
Posts: 399
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This may or may not help. It will probably confuse things even more

Here's what I have in my httpd.conf:
Code:
RewriteRule ^/f([0-9]+)/?$ /forumdisplay.php?forumid=$1&s=$2 [L]
RewriteRule ^/t([0-9]+)\.html$ /showthread.php?threadid=$1 [L]
I dispensed with the session tag as it wasn't really helping the spiders becaue the number would change each time anyway. I also edited all my templates to sort out the drop-down problems (I did this before I read porfiry's post).

In your problem examples I notice you don't start the url with a slash. You might want to try that. You never know.
Reply With Quote
  #60  
Old 07-30-2001, 08:19 PM
ThomasP
Guest
 
Posts: n/a
Default

Hi fastforward,

thanks for answering, I tried that, but it didn't seem to work

Are these the only two line regarding rewrite in your conf?
Where is the one which builds the /f1/... or /fx/...?

I really would like to sort it out since this is one of the most useful hack for vB ever - maybe even for php-based sites in general.

Thanks,
-Tom
Reply With Quote
  #61  
Old 07-30-2001, 09:02 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 fastforward
This may or may not help. It will probably confuse things even more

Here's what I have in my httpd.conf:
Code:
RewriteRule ^/f([0-9]+)/?$ /forumdisplay.php?forumid=$1&s=$2 [L]
RewriteRule ^/t([0-9]+)\.html$ /showthread.php?threadid=$1 [L]
I dispensed with the session tag as it wasn't really helping the spiders becaue the number would change each time anyway. I also edited all my templates to sort out the drop-down problems (I did this before I read porfiry's post).

In your problem examples I notice you don't start the url with a slash. You might want to try that. You never know.
what do i need to do to remove the session tag but still have this format

http://animeboards.com/f38/s
http://animeboards.com/t20418/s.html

?

currently i have in my httpd.conf
Quote:
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]
RewriteRule ^/html/.* /html/index.php [L]
thanks
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:45 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.05443 seconds
  • Memory Usage 2,300KB
  • 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
  • (4)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
  • (6)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