vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Spider friendly URLs (https://vborg.vbsupport.ru/showthread.php?t=18035)

fastforward 10-17-2002 09:31 PM

Are you on a dedicated server? If not, you may not have access httpd.conf. If you are on a dedicated, what is the OS and what is the web server or who is your host?

I believe somebody installed this using .htaccess although I have not done so.

Velocd 10-18-2002 04:46 AM

I'm not on a dedicated server..so that is probably the reason I cannot find the file. :(

[high]* Velocd snaps his fingers then walks away[/high]

jOOPeON 10-21-2002 06:12 AM

Hi guys,

I installed this great hack couple weeks ago and everything went like charm.
Thread links looks just like they should look ( domain.com/t27927.html),
forums looks ok (domain.com/f232)....

I've been watching Google to visit all the forums, but for some reason it doesn't touch the threads?
Have they changed the bot or what could be wrong?
Anyway the googlebots visits the site daily and every day it spiders everything else but threads??

-jOOP

jOOPeON 10-21-2002 10:30 AM

Quote:

Originally posted by jOOPeON
Hi guys,

I installed this great hack couple weeks ago and everything went like charm.
Thread links looks just like they should look ( domain.com/t27927.html),
forums looks ok (domain.com/f232)....

I've been watching Google to visit all the forums, but for some reason bots doesn't touch the threads?
Have they changed the bot or what could be wrong?
Anyway the googlebots visits the site daily and every day they spiders everything else but threads??

-jOOP

Now i changed also the forum links to look like www.domain.com/f1231.html

Will see what happens?

-jOOP

Paul 11-02-2002 03:46 AM

[QUOTE]Originally posted by eva2000
got it to work now with this
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]


Paul 11-02-2002 05:08 AM

[QUOTE]Originally posted by fastforward

easypeasy :)
In online.php : Change the 'default' block of the CASE statement on or around line 626 to look like this:
Code:

  default:
    if (preg_match ("/t([0-9]+)\.html/", $filename, $match)) {
      $userinfo[threadid] = $match[1];
      $userinfo[activity] = 'showthread';
      $threadids .= ",$userinfo[threadid]";
    } elseif (preg_match ("/f([0-9]+)/", $filename, $match)) {
      $forumid = $match[1];
      $forumids .= ",$forumid";
      $userinfo[activity] = 'forumdisplay';
      $userinfo[forumid] = $forumid;
    } elseif (preg_match ("/robots\.txt/", $filename)) {
      $userinfo[activity] = 'spider';
    } else {
      $userinfo[activity] = 'unknown';
    }
  }


Paul 11-03-2002 10:42 PM

Now--this should be interesting. I'm having quite a serious issue with my forum, and I'm guessing it has something to do with this hack. Prior to installing it, we hadn't seen it before.

I'm using the following rewrite rules:

Code:

        RewriteEngine on
        RewriteRule ^/forumdisplay.php(.*)$ /forums/forumdisplay.php$1 [R=permanent,L]
        RewriteRule ^/f([0-9]+)/?$ /forums/forumdisplay.php?forumid=$1 [L]
        RewriteRule ^/f([0-9]+)/s([^/]+?)\.html$ /forums/forumdisplay.php?forumid=$1&s=$2 [L]
        RewriteRule ^/f([0-9]+)/t([0-9]+)/?$ /forums/showthread.php?threadid=$2 [L]
        RewriteRule ^/f([0-9]+)/t([0-9]+)/s([^/]+?)\.html$ /forums/showthread.php?threadid=$2&s=$3 [L]
        RewriteRule ^/t([0-9]+)\.html$ /forums/showthread.php?threadid=$1 [L]
        RewriteRule ^/t([0-9]+)/s([^/]+?)\.html$ /forums/showthread.php?threadid=$1&s=$2 [L]
        RewriteRule ^/s([^/]+?)\.html$ /forums/index.php?s=$1 [L]

        RewriteRule ^/forums/f([0-9]+)/?$ /forums/forumdisplay.php?forumid=$1 [L]
        RewriteRule ^/forums/f([0-9]+)/s([^/]+?)\.html$ /forums/forumdisplay.php?forumid=$1&s=$2 [L]
        RewriteRule ^/forums/f([0-9]+)/t([0-9]+)/?$ /forums/showthread.php?threadid=$2 [L]
        RewriteRule ^/forums/f([0-9]+)/t([0-9]+)/s([^/]+?)\.html$ /forums/showthread.php?threadid=$2&s=$3 [L]
        RewriteRule ^/forums/t([0-9]+)\.html$ /forums/showthread.php?threadid=$1 [L]
        RewriteRule ^/forums/t([0-9]+)/s([^/]+?)\.html$ /forums/showthread.php?threadid=$1&s=$2 [L]
        RewriteRule ^/forums/s([^/]+?)\.html$ /forums/index.php?s=$1 [L]

I did it this way so that www.domain.com/f1 links would work as well as www.domain.com/forums/f1--so far so good. The problem is that every time I follow a link, a new session hash is generated--this means all sorts of login problems.

Could this be related to this hack in some way? I don't even know where to start! :(

Thanks,
Paul

Edit: I also made an adjustment to online.php. My version looks like this:

PHP Code:

  // Hack: Allow WOL to work with spider friendly URLs - Nov 2, 2002 - Paul
  /*
    $userinfo[activity] = 'unknown';
  */
    
if (preg_match ("/t([0-9]+)/"$loc$match)) {
       
$userinfo[threadid] = $match[1];
       
$userinfo[activity] = 'showthread';
       
$threadids .= ",$userinfo[threadid]";
    } elseif (
preg_match ("/f([0-9]+)/"$loc$match)) {
       
$forumid $match[1];
       
$forumids .= ",$forumid";
       
$userinfo[activity] = 'forumdisplay';
       
$userinfo[forumid] = $forumid;
    } elseif (
preg_match ("/robots\.txt/"$filename)) {
       
$userinfo[activity] = 'spider';
    } else {
      
$userinfo[activity] = 'unknown';
    }
  
// End hack: Allow WOL to work with spider friendly URLs 


Erwin 11-03-2002 10:50 PM

Change &s=$2 to just &s= in your .htaccess and see what happens. It works for me. However, this way, sessionhash is always cleared. I have had no problems with any of my users - I just tell them they need to enable cookies for my site to work.

Paul 11-03-2002 10:55 PM

Hi Erwin,

Thanks for the suggestion. The *REALLY* weird part about this is that I'm using the vbulletin URL's to test this out--it DOESN'T happen when I use the rewrite urls. (i.e. http://www.domain.com/forums/index.php?s=######...)

I don't want to force them to use cookies though :(... I'm staring at the apache rewrite rule manual now trying to figure out what I'm missing here. :)

Paul 11-03-2002 11:10 PM

I removed the redirects completely, restarted apache, and uploaded the unhacked online.php--the problems continued to persist. I wonder if this might be a real vb bug ;)


All times are GMT. The time now is 04:22 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.01315 seconds
  • Memory Usage 1,760KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (1)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete