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)

Howard 12-31-2001 11:22 AM

I just tried this hack on my v2.2.1 vb with both the .htaccess and httpd.conf methods. The forum urls look fine (ie http:/www.howardforums.com/f1/) however all the image links except the forum logo have stopped working. Any ideas?

Howard 12-31-2001 06:48 PM

Oh yeah I forgot to mention, the page is spitting out images that are located in directories like this: http://www.howardforums.com/f4/images/... instead of http://www.howardforums.com/images...

LanciaStratos 01-02-2002 11:01 PM

This great hack desparately needs a update - I don't have a clue where to start on this! Could someone please wrap all this up in one new hack, and eliminate the confusion? It would definitely be appreciated by many people! :)

chaz7979 01-03-2002 02:36 AM

I'm with LanciaStratos on this one.

fastforward 01-06-2002 04:53 AM

Quote:

Originally posted by LanciaStratos
This great hack desparately needs a update - I don't have a clue where to start on this! Could someone please wrap all this up in one new hack, and eliminate the confusion? It would definitely be appreciated by many people! :)
I intend to revisit this very shortly. I've finally started to prepare for upgrading my forums to 2.2.1. It will probably be a couple of weeks though.

LanciaStratos 01-06-2002 02:55 PM

Quote:

Originally posted by fastforward

I intend to revisit this very shortly. I've finally started to prepare for upgrading my forums to 2.2.1. It will probably be a couple of weeks though.

Great!!! I can't wait - best of luck upgrading your forums!!! :D

eva2000 01-06-2002 03:53 PM

Quote:

Originally posted by Howard
I just tried this hack on my v2.2.1 vb with both the .htaccess and httpd.conf methods. The forum urls look fine (ie http:/www.howardforums.com/f1/) however all the image links except the forum logo have stopped working. Any ideas?
read my solutions very early in this thread.. i have the hack installed for ages on 2.2.0 modified and it works like a charm

chaz7979 01-06-2002 03:59 PM

Doesnt google spider urls with ? now anyway?

fastforward 01-06-2002 05:54 PM

Quote:

Originally posted by eva2000
read my solutions very early in this thread.. i have the hack installed for ages on 2.2.0 modified and it works like a charm
I think the issue is with multipage threads. My initial release only rewrote the first page of links.

The difficulty is not so much rewriting the links, it's maintaining the other options such as 'perpage' and sort order etc.

LanciaStratos 01-06-2002 05:55 PM

Quote:

Originally posted by chaz7979
Doesnt google spider urls with ? now anyway?
You know, I've seen plenty of sites with a "?" in the URL, (some even with forums like phpBB), on Google and they got indexed just fine... :confused: Would someone care to explain this?

fastforward 01-06-2002 05:57 PM

Quote:

Originally posted by chaz7979
Doesnt google spider urls with ? now anyway?
You'll get a higher page rank with 'mysite.com/t127634.html' than if you used the normal url. Besides, google isn't the only searchengine out there.

chaz7979 01-06-2002 06:21 PM

Oh I know google isnt the only one out there but they are one of the only ones who was thought to have problems with the ? question marks.

eva2000 01-09-2002 05:20 AM

Quote:

Originally posted by fastforward

I think the issue is with multipage threads. My initial release only rewrote the first page of links.

The difficulty is not so much rewriting the links, it's maintaining the other options such as 'perpage' and sort order etc.

i see.. i'm happy with first page indexing only anyway :)

Prince 01-10-2002 12:44 AM

Quote:

Originally posted by fastforward

Besides, google isn't the only searchengine out there.

No it's not, but it's the most important search engine!

LanciaStratos 01-20-2002 04:32 PM

Quote:

Originally posted by fastforward

I intend to revisit this very shortly. I've finally started to prepare for upgrading my forums to 2.2.1. It will probably be a couple of weeks though.

Hey fastforward, are you still planning on revisiting this hack? :)

tamarian 01-21-2002 04:56 PM

Hi folks,

I have an idea to make this hack more powerful, and require a new addition to this hack, possibly in the code.

I thought of this after I noticed I had many Netscape 4.x users, so I created new style set for them, and placed a link on the main page to "Fix Netscape errors" which simply sets their style id to use the original vB dynamic links.

This makes spiders and most surfers use the new (spider friendly) links, while those who click the "Fix link" can use original vB links in their templates.

The disadvantage, is that some users post links to other thread in spider-friendly format, that other members have trouble accessing if they have Netscape.

What I would like to do, instead, is this:

Detect if the visitor is using a browser agent (IE, Netscape, Mozilla), and if so, set their id to use a default style set (with vB's dynamic links)

If the user agent is other than (Mozilla-compatibele) then use a special style id that contain spider-friendly templates.

It initially sounded easy to me, but then I though that spider robots cannot be cookied, and any style id I assign them in my index.php code, may have to be re-checked in other parts of the code beside index.php? i.e. showthread etc.

Is there an easy way of accomplishing this?

tpearl5 02-02-2002 03:41 AM

I had to modify a couple things in the links to get everything working properly.
This may apply to 2.2.2, however I'm not positive:

In my .htaccess file I have:
Quote:

RewriteEngine on
RewriteRule ^f([0-9]+)/?$ forumdisplay.php?forumid=$1&s=$2 [L]
RewriteRule ^t([0-9]+)\.html$ showthread.php?threadid=$1 [L]
RewriteRule ^t([0-9]+)-([0-9]+)\.html$ showthread.php?threadid=$1&perpage=15&pagenumber=$ 2 [L]
RewriteRule ^f([0-9]+)-([0-9]+)/$ forumdisplay.php?forumid=$1&daysprune=1000&sortord er=&sortfield=lastpost&perpage=40&pagenumber=$2 [L]
RewriteRule ^[ft]([0-9]+)/s([^/]*)/(.+)$ /$3 [L]
In forumhome templates I have:

<a href="$bburl/midiboard/f$forum[forumid]">

(midiboard is subdirectory of site)

In forumdisplay templates I have:

<a href="$bburl/f$forum[forumid]">

And in forumdisplaybit:

<a href="$bburl/t$thread[threadid].html">


Also the base href tag in the head include needed an extra trailing slash to make images work. Other then that everything seems to be okay.

tamarian 02-02-2002 01:39 PM

Quote:

Originally posted by tpearl5

Also the base href tag in the head include needed an extra trailing slash to make images work.

Tpearl, we have been slaving on this trying to fix it for old Netscape browsers, and none of us cought the missing slash problem.

Thanks! :up:

tpearl5 02-02-2002 08:10 PM

Wow.. I didn't know it was a problem. ;) Images didn't work in MSIE without that slash for me.

tamarian 02-02-2002 08:38 PM

Quote:

Originally posted by tpearl5
Wow.. I didn't know it was a problem. ;) Images didn't work in MSIE without that slash for me.
They worked fine for IE's, but Netscapes 4.7 and earlier had a problem with them.

I even started hacking the sessions and redirecting to different style id's based on user agents! Currently, registered members get the vB dynamic links, and guests get the spider-friendly ones.

I'll keep it that way, but I'll remove the link to Netscape upgrade.

That's always the case with debugging, you look hard for difficult mistakes, and they turn out to be too obvious to catch ;)

tpearl5 02-03-2002 12:33 AM

I just changed the link in forumdisplay_multipagenav_pagenumber

to

$bburl/t$thread[threadid]-$acurpage.html

Now I have short URL's to multi page threads :)

MarkB 02-20-2002 04:27 AM

Just installed this, and it works great - just two questions:

How can I fix it so Who's Online displays where a user is instead of Unknown Location: /forum/t15321/s7406f2d946ce71b342e89b3a9607ac99.html?

Also, would it be at all possible to hack this so, instead of www.yourdomain/forum/f13/ it has www.yourdomain.com/forum/chat/ (where "chat" is the forum title)? That'd be a huge improvement, I think :)

But, I have to say that - as it stands - this is great! :)

~DC 03-01-2002 11:45 AM

hmm...Im still having trouble,
my dir is www.domain.com/forums - help!

slinky 03-01-2002 12:58 PM

Mmmm... can't help you with a problem we don't know about! Also, your site's forums don't appear...

~DC 03-01-2002 10:36 PM

me? I was testing the hack and my forums are www.designerchat.net/forums

I was just using www.domain.com/forums as an example

etom 03-02-2002 03:12 PM

Is there a (nearly) final version of this ?

After reading ~140 posts there is nothing but confusion about problems with images and netscape and what ever ...

Does an "any browser" solution exists or not ?

greets

slinky 03-02-2002 03:22 PM

Many are using this without a problem, including myself.

~DC 03-03-2002 06:26 AM

Could you please paste your code?

slinky 03-03-2002 06:42 AM

The code is exactly the same as you see here.

~DC 03-03-2002 07:14 AM

ahh...damn

etom 03-03-2002 09:48 AM

slinky: what is Your definition of 'here' ;)

slinky 03-03-2002 10:47 AM

I'm not sure if something here is upsetting you. If you want help with problems that you are having, you need to clearly explain what your problems are. It will probably be more helpful in troubleshooting to provide an explanation rather than just a reference to your site.

Admin 03-16-2002 12:55 PM

Just installed this here, seems to be working great. :)

fastforward 03-16-2002 01:57 PM

Quote:

Originally posted by FireFly
Just installed this here, seems to be working great. :)
Not quite... The 'who installed this hack' link isn't working. You'll need to either but bburl or a slash in front of the url. I'm guessing that's probably inside the javascript. The 'base href' in the header doesn't seem to fix everything.

EDIT:
Forget it... Either you just fixed it or there be gremlins on this here site :)

AWS 03-17-2002 08:01 PM

I installed this and get 400 bad request errors. If I use the rewrite rule from the zip I get 500 error and in error log it says it can't parse regex. I used the modified rules and then I get 400 error. Anyone know what the problem might be?

leebo 03-22-2002 12:41 PM

Any chance of getting it converted to the autohack ( vbhacker )

Thanks :)

Thomas P 05-03-2002 11:48 PM

Hi there,

I'm trying this the 'n'th time now, meanwhile I switched hosters 3
times and all of them support mod_rewrite.
Nothing ever worked for me, am I that lame? I think so...

I use
Code:

RewriteEngine on
RewriteRule ^f([0-9]+)/?$ forumdisplay.php?forumid=$1&s=$2 [L]
RewriteRule ^t([0-9]+)\.html$ showthread.php?threadid=$1 [L]
RewriteRule ^t([0-9]+)-([0-9]+)\.html$ showthread.php?threadid=$1&perpage=15&pagenumber=$2 [L]
RewriteRule ^f([0-9]+)-([0-9]+)/$ forumdisplay.php?forumid=$1&daysprune=1000&sortorder=&sortfield=lastpost&perpage=40&pagenumber=$2 [L]
RewriteRule ^[ft]([0-9]+)/s([^/]*)/(.+)$ /$3 [L]

in an .htaccess-file in my forum-directory where all
the vB-files reside.

After placing the htaccess-file i should be able to browse my board by typing in
something like http://mcseboard.de/f3 which should get me
http://www.mcseboard.de/forumdisplay.php?&forumid=3 - it doesn't


What's wrong here?
Thanks for any hint,
-Tom

P.S.: My URL isn't domain.com/forum but straight domain.com
That's the only difference I can see to a standard vB installation.

mano1.com 05-31-2002 03:00 AM

what is the latest version of this hack? There are so many posts I am not sure if I'd be up to date downloading the original file posted.

Thanks for letting me know

:)

Kyle_TX 06-17-2002 05:25 PM

I want to install this, however I have a quick question.

Is this going to affect my current search engine listings?

The Piper 06-20-2002 08:28 PM

I compiled all the information regarding spider friendly URLs using .htaccess into one file, since a lot of people (including myself) were feeling a bit lost.

Please notice I do NOT claim any authorship on anything here. I merely copied a lot of information from a lot of threads into one file.

There may be errors, so I don't guarantee anything. You are using this on your own risk. It's working at my site, so I hope it works for you. One last thing, since I didn't create any of this, I won't be supporting anything, because I'm a newbie and I don't have much time. Just thought I'd contribute with my 2 cents.

Many thanks to all the people who helped me make this work on my site.

Shine on!
Paulo


All times are GMT. The time now is 08:58 AM.

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.01439 seconds
  • Memory Usage 1,830KB
  • 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
  • (1)bbcode_code_printable
  • (13)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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