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

Reply
 
Thread Tools
Spider Friendly URL hack Details »»
Spider Friendly URL hack
Version: 1.00, by krohnathlonman krohnathlonman is offline
Developer Last Online: Dec 2008 Show Printable Version Email this Page

Version: 3.0.3 Rating:
Released: 09-26-2004 Last Update: Never Installs: 10
Is in Beta Stage  
No support by the author.

I've started using better URLs for the search engines and I'm looking for some advice on what templates to modify. I also don't have the multi page part working right currently so I could use some help on that.

I haven't figured out the part to go to specific posts quite yet but I thought I'd share what I have so far.

URLs for the threads now look like this:
http://www.iamnotageek.com/t-76948.html

Insert this into your .htaccess file in your forum base directory.
Code:
  RewriteEngine on
  RewriteRule ^t-([0-9]+) showthread.php?t=$1 [L]
Now test it by using a URL like domain.com/forum/t-THREADID.html

If that shows the thread properly THEN go into your admincp and use the template search function. Do a search for showthread.php and start editing those templates to send people to these new URLs. Don't modify things like the next page links.

This could potentially raise CPU usage quite a bit but my site pulls a decent amount of people per day and I'm not noticing much of a spike in CPU usage.

This can also be done for forums. I've done it here http://iamnotageek.com/f-46.html

If I can get the next page system working right I'll get the full instructions together.

Show Your Support

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

Comments
  #32  
Old 10-01-2004, 08:54 PM
krohnathlonman krohnathlonman is offline
 
Join Date: Feb 2004
Posts: 157
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

using the names in the URL is simple... Basically have the rewrite completely ignore the text after the f-28 then you can have f-28-Iamthekingof_myownworld.html if you want and all that it cares to parse is the f-28
Reply With Quote
  #33  
Old 10-01-2004, 10:48 PM
Logikos Logikos is offline
 
Join Date: Jan 2003
Posts: 2,924
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well it will spider much better if the forum names where in the URL.

http://www.google.com/search?hl=en&i...=Google+Search

http://www.google.com/search?hl=en&l...ro&btnG=Search

How could i do this without always havin to hack the .htacess file every time.
Reply With Quote
  #34  
Old 10-01-2004, 10:53 PM
msimonds msimonds is offline
 
Join Date: Aug 2003
Location: Dallas, Texas
Posts: 157
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

http://www.sportsrant.com/forums/f28...im-angels.html
http://www.sportsrant.com/forums/f29...e-orioles.html
http://www.sportsrant.com/forums/f31...h-pirates.html

These are examples from my forum, using the mod from Dani's tutorial with a few corrections.

This is the only content that is in my .htaccess file:

Quote:
RewriteEngine on
Options +FollowSymLinks
RewriteRule ^thread([0-9]+).html$ showthread.php?t=$1 [L]
RewriteRule ^lastpostinthread([0-9]+).html$ showthread.php?goto=lastpost&t=$1 [L]
RewriteRule ^newpostinthread([0-9]+).html$ showthread.php?goto=newpost&t=$1 [L]
RewriteRule ^forum([0-9]+).html$ forumdisplay.php?f=$1 [L]
RewriteRule ^f([0-9]+)-(.*).html$ forumdisplay.php?forumid=$1 [L]
RewriteRule ^post([0-9]+).html$ showthread.php?p=$1 [L]
I dont have to add a new line everytime I add a forum, the changes in Dani's mod already does that, with some help of another poster of there at her forums named Ted. I am willing to help anyone that needs it, just IM or PM me

It is really easy to put in place

Is this what you were asking, so you dont have to change the htaccess everytime you add or delete a forum
Reply With Quote
  #35  
Old 10-02-2004, 06:01 AM
krohnathlonman krohnathlonman is offline
 
Join Date: Feb 2004
Posts: 157
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

its this line here that does it
RewriteRule ^f([0-9]+)-(.*).html$ forumdisplay.php?forumid=$1 [L]
the * means don't do any form of parsing of that
Reply With Quote
  #36  
Old 10-02-2004, 06:52 AM
Logikos Logikos is offline
 
Join Date: Jan 2003
Posts: 2,924
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks, i got it to work. Now im making it so threads are in the html. Like http://mysite.com/t-71.Spider-Friendly-URL-hack.html. and having it cut it out with long URLS.
Reply With Quote
  #37  
Old 10-17-2004, 05:58 AM
h75's Avatar
h75 h75 is offline
 
Join Date: Sep 2004
Posts: 52
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

what i have to do im Templates??

Template forumhome_lastpostby
Code:
<a href="showthread.php?$session[sessionurl]goto=newpost&amp;t=$lastpostinfo[lastthreadid]" title="<phrase 1="$lastpostinfo[lastthread]">$vbphrase[go_first_unread_in_thread_x]</phrase>"><strong>$lastpostinfo[trimthread]</strong></a>

<a href="showthread.php?$session[sessionurl]goto=lastpost&amp;t=$lastpostinfo[lastthreadid]"><img class="inlineimg" src="$stylevar[imgdir_button]/lastpost.gif" alt="$vbphrase[go_to_last_post]" border="0" /></a>
What exactly do I have to change? Because the Sessionid is also important!
Reply With Quote
  #38  
Old 01-20-2005, 10:29 PM
Ruffneck Ruffneck is offline
 
Join Date: Oct 2002
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi all, i´ve like this hack.

A little question, i´ve replace the link on a forumhome last topics template:

OLD WAS
<a href="showthread.php?$session[sessionurl]threadid=$thread[threadid]" title="$thread[preview]"><strong>$thread[title]</strong></a>
<em>$vbphrase[last_post]:</em> $thread[date]

NEW CODE

<a href="t-$thread[threadid]-$thread[title].html" title="$thread[preview]"><strong>$thread[title]</strong></a>
<em>$vbphrase[last_post]:</em> $thread[date]

Problem, the thread title was:
Willkommen, gabby
He makes: t-9020-Willkommen,%20gabby!.html

I don´t like ",%" on the url

Psycho Beat Project would be:
t-9019-Psycho%20Beat%20Project.html

I want replace signs like "" "," "." or "/20" with a "-" sign.

Example t-9019-Psycho-Beat-Project.html or much better
Psycho-Beat-Project.html

Update: I´ve created a $ttitle with replace string the signs like "!"...

I think it´s not the best way, because i must replace also $lastthread strings like "!" on the forumhome...
Reply With Quote
  #39  
Old 03-30-2005, 11:36 AM
Sun Boy Sun Boy is offline
 
Join Date: Feb 2003
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this is one of the most best hack i ever seen

i will start using it right now and i hope we could do the rest also so owre site's will be all from a to z HTML pages

i have a website that i made is spider friendly
it's 4images
see this
http://www.racing4e.com/index.html
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 01:45 PM.


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.05289 seconds
  • Memory Usage 2,292KB
  • 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
  • (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
  • (2)pagenav_pagelink
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (8)postbit
  • (9)postbit_onlinestatus
  • (9)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