The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Details »» | |||||||||||||||||||||||||
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
|
Comments |
#302
|
|||
|
|||
I don't have a "httpd.conf" file...now what?
|
#303
|
|||
|
|||
hey lierduh or anyone else, after installing this hack, now me and my members can't view threads over 30 days old and I did set all my forums to show threads from the beginning.
Can anyone please help me fix this because google wont be able to index pages that are older than 30 days even though I dont care about that but I want my members to be able to view their old post or bring old posts back up. Please someone post a fix for this |
#304
|
||||
|
||||
Anyone got this working with vB3 RC2 ?
my forum urls are forumdomain.com/f123/s forumdomain/t234/s.html my old rewrite rules for vB 2.3.x were Code:
RewriteEngine on RewriteRule ^/f([0-9]+)/?$ /forumdisplay.php?forumid=$1 [L] RewriteRule ^/f([0-9]+)/s?$ /forumdisplay.php?forumid=$1 [L] RewriteRule ^/t([0-9]+)\.html$ /showthread.php?threadid=$1 [L] RewriteRule ^/t([0-9]+)/s([^/]?)\.html$ /showthread.php?threadid=$1&s=$2 [L] RewriteRule ^/s([^/\?]0-9)+/$ /index.php?s=$1 [L] Code:
AddType text/x-server-parsed-html .html AddType text/x-server-parsed-html .htm Redirect /forums/ http://animeboards.com/index.php ErrorDocument 404 http://animeboards.com/index.php ErrorDocument 400 http://animeboards.com/index.php ErrorDocument 401 /401.php <Limit GET PUT POST> order allow,deny allow from all deny from .paonline.com deny from 216.220.160 deny from 216.220.161 deny from 216.220.162 deny from 216.220.163 deny from 216.220.164 deny from 216.220.165 deny from 216.220.166 deny from 216.220.167 deny from 216.220.168 deny from 216.220.169 deny from 216.220.170 deny from 216.220.171 deny from 216.220.172 deny from 216.220.173 deny from 216.220.174 deny from 216.220.175 deny from 12.148.196 deny from 12.148.209 </Limit> so i gave up and tried looking for ways to use mod_rewrite to instead redirect to a file with message of the new url location using this code in url.php PHP Code:
but problem is if i use mod_rewrite such as Code:
RewriteEngine on RewriteRule ^/f([0-9]+)/?$ /url.php [T=application/x-httpd-php,L] RewriteRule ^/f([0-9]+)/s?$ /url.php [T=application/x-httpd-php,L] RewriteRule ^/t([0-9]+)\.html$ /url.php [T=application/x-httpd-php,L] RewriteRule ^/t([0-9]+)/s([^/]?)\.html$ /url.php [T=application/x-httpd-php,L] any ideas ? |
#305
|
|||
|
|||
Quote:
However, it's a very sound theory still and does neaten the whole URL thing. And because it's you who ask so soon eva2000 I'll look at it when I do my upgrade to VB3. How comprehensive do we want it? Last time it was reasonably comprehensive... but do we want to extend it to ALL URL's? Save for the form post ones obviously... just the ones that guests can get to... such as Member Profiles and Calendar entries as well as the Home, Forum, Thread, Post and top level pages. Maybe this time we can get it all into one nice big (enormous ) install file. Anyhow... I'll look into it soon... I have to renew my vBulleting subscription first! tsk! For reference to others... here were the last iteration of the rewrite rules I was using on my server: Code:
RewriteEngine on RewriteBase /forum # # forumdisplay.php rewriting # # f2.html = forumid RewriteRule ^f([0-9]+)\.html$ forumdisplay.php?forumid=$1 [L] # # f2--25--lastpost---2.html = forumid + daysprune + sortfield + sortorder + pagenumber RewriteRule ^f([0-9]+)--([0-9]+)--([a-z]+)---([0-9]+)\.html$ forumdisplay.php?forumid=$1&daysprune=$2&sortorder=&sortfield=$3&perpage=25&pagenumber=$4 [L] # # f2--25--lastpost--asc-2.html = forumid + daysprune + sortfield + sortorder + pagenumber RewriteRule ^f([0-9]+)--([0-9]+)--([a-z]+)--([a-z]+)-([0-9]+)\.html$ forumdisplay.php?forumid=$1&daysprune=$2&sortorder=$4&sortfield=$3&perpage=25&pagenumber=$5 [L] # # showthread.php rewriting # # t2.html = threadid # RewriteRule ^t([0-9]+)\.html$ showthread.php?threadid=$1 [L] # # t2-15-2 = threadid + perpage + pagenumber RewriteRule ^t([0-9]+)-([0-9]+)-([0-9]+)\.html$ showthread.php?threadid=$1&perpage=$2&pagenumber=$3 [L] # # t2-15--friendster--2.html = threadid + perpage + highlight + pagenumber RewriteRule ^t([0-9]+)-([0-9]+)--(.*)--([0-9]+)\.html$ showthread.php?threadid=$1&perpage=$2&highlight=$3&pagenumber=$4 [L] # # avatar.php rewriting # # av1-1053412959.gif = userid + dateline RewriteRule ^av([0-9]+)-([0-9]+).gif$ avatar.php?userid=$1&dateline=$2 [L] # # attachment.php rewriting # # atp157156.gif = postid + extension RewriteRule ^atp([0-9]+).([a-z]+)$ attachment.php?postid=$1 [L] # att157156.gif = attachmentid + extension RewriteRule ^att([0-9]+).([a-z]+)$ attachment.php?attachmentid=$1 [L] # # Correcting the page navigation where it is used in other parts of the forum. # RewriteCond %{QUERY_STRING} ^(.*)-([0-9]+)\.html$ RewriteRule ^memberlist.php$ memberlist.php?%1&pagenumber=%2? [L] RewriteCond %{QUERY_STRING} ^(.*)-([0-9]+)\.html$ RewriteRule ^search.php$ search.php?%1&pagenumber=%2? [L] RewriteCond %{QUERY_STRING} ^(.*)-([0-9]+)\.html$ RewriteRule ^member.php$ member.php?%1&pagenumber=%2? [L] RewriteCond %{QUERY_STRING} ^(.*)-([0-9]+)\.html$ RewriteRule ^member2.php$ member2.php?%1&pagenumber=%2? [L] I was putting the datestamp of the avatar in the avatar URL so that each upload of a custom avatar would result in a unique URL Anyway... I'll look at the VB3 possibilities once I get my license and a copy of the code... which should be in a week or two Cheers David K |
#306
|
||||
|
||||
thanks David.. i think to keep it simple to forum and thread links
forumdomain.com/f123/s forumdomain/t234/s.html i don't even mind if these redirect to the real longer url, just as long as they point to the respective forum id or thread id to keep my in-forum post referenced links valid (otherwise members who posted links using shorter urls in their past posts would all be invalid) |
#307
|
|||
|
|||
That's even easier then
I'll knock up something that does redirects so that your existing links in posts aren't broken I'll try and do that this weekend... and that bit should be possible without the codebase |
#308
|
|||
|
|||
Quote:
You might like to enable the rewrite log to debug the problem. I have an example at: http://www.vbulletin.com/forum/showp...7&postcount=89 My current rulesets for the legacy links are posted here: https://vborg.vbsupport.ru/showpost....&postcount=298 They have worked for me since beta 7, then Gamma, now RC2. Also, if you disable the error redirects, I might be able to work out the problem if you provide a sample link. For other people who is looking at doing this hack, I can't think of a reason to implement this hack in vB3. Just kill the session id in seesions.php, the bots will index the pages. Make sure to include a robots.txt file to exclude member.php etc!!! |
#309
|
|||
|
|||
Quote:
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] 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] 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> 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 |
#310
|
|||
|
|||
I don't own my own server yet, But my question is. does the the .htaccess file and httpd.conf file exsit on each domain registered on the server, or just one file alone for all domain being hosted by the provider? www.computerproblems.org is the site im refering to.
|
#311
|
||||
|
||||
http.conf is used for the global Apache configuration, this file only occurs once, you can specify per domain options in the relevent sections too. .htaccess is used for per directory (and any sub directory) options, so if placed in public_html (or similar) should effect the whole site unless another directory overrides the config.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|