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)

ThomasP 07-29-2001 12:03 PM

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

ThomasP 07-29-2001 12:51 PM

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...

auto 07-29-2001 01:07 PM

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.

ThomasP 07-29-2001 01:18 PM

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

auto 07-29-2001 06:12 PM

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.

ThomasP 07-29-2001 08:03 PM

Then we seem to have the same problem... :(

auto 07-29-2001 09:52 PM

Sure does look like it.

fastforward 07-29-2001 10:06 PM

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.

ThomasP 07-30-2001 08:19 PM

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

eva2000 07-30-2001 09:02 PM

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 :)


All times are GMT. The time now is 09:21 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.02332 seconds
  • Memory Usage 1,745KB
  • 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
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)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