vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Urgently need a .htaccess rule (https://vborg.vbsupport.ru/showthread.php?t=185867)

jscieza 07-20-2008 05:35 PM

Urgently need a .htaccess rule
 
Hi to everyone,

I have been using tfSEO for my forum for 4 months and all URLs (showthread and forumdisplay) has been rewritten with a 301 redirect so now Google has my index with the following URL structure:

http://www.mydomain.com/f149/example...d-title-23313/

However with tfSEO uninstalled (since yesterday), my URLs structure are the classic ones:

http://www.mydomain.com/showthread.php?t=23313

So I urgently need to know if there is possible to set-up a .htaccess rule to 'revert" this redirection. There are more than 12,000 threads on my forum and I really do not want to get millions of 404 erros.

Please help me if you know how I can solve it. I will be very thanked.

Thank you very much for your help!

Joanthan.

snakes1100 07-20-2008 05:38 PM

You need to post in the thread you got the modification from, that hack does show as supported.

superjeff 07-20-2008 06:26 PM

Disable the plugin don't delete the .htaccess, you will no get 404 errors, but easly duplicate content.

But really d'like to know why disinstalled..

jscieza 07-20-2008 08:19 PM

Hi Jeff,

I have just tell you the reason by PM.

Could you please tell me a .htaccess rule which could "revert" the redirections made by tfSEO? Any ideas guys? For example:

http://www.mydomain.com/f149/example...d-title-23313/

to

http://www.mydomain.com/showthread.php?t=23313

Thank you very much for help!

Jonathan.

yahsuah 12-15-2011 04:53 PM

I have been looking for this too.

kh99 12-15-2011 05:36 PM

I should start out by saying that I don't know a lot about writing htaccess files. But if you look at the last page of the mod thread, the author (posting with a different account) has provided an htaccess file for converting from his mod to vb4 style urls. You didn't say you wanted vb4 urls, but i think the first part of what was posted might work to do what you want:

Code:

RewriteEngine on

RewriteRule ^(.*)t([0-9]+)(.*)newpost(.*)$ showthread.php?t=$2&goto=newpost [QSA,L]
RewriteRule ^(.*)f(.*)/(.*)t([0-9]+)(.*)/post([0-9]+)(.*)$ showpost.php?p=$6 [QSA,L]
RewriteRule ^(.*)f(.*)/(.*)t([0-9]+)(.*)/([a-z]+)([0-9]+)(.*)$ showthread.php?t=$4&page=$7 [QSA,L]
RewriteRule ^(.*)f(.*)/(.*)t([0-9]+)(.*)$ showthread.php?t=$4 [QSA,L]
RewriteRule ^(.*)f([0-9]+)/([a-z]+)([0-9]+)(.*)$ forumdisplay.php?f=$2&page=$4 [QSA,L]
RewriteRule ^f([0-9]+)(.*)$ forumdisplay.php?f=$1 [QSA,L]
RewriteRule ^(.*)-f([0-9]+)(.*)$ forumdisplay.php?f=$2 [QSA,L]


one thing I found out by testing it out is that if you have your forum root in a subdirectory (forum/showthread.php, etc), then you need to add the directory to each of these rules, like for instance

Code:

RewriteRule ^(.*)t([0-9]+)(.*)newpost(.*)$ forum/showthread.php?t=$2&goto=newpost [QSA,L]


All times are GMT. The time now is 12:49 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.01713 seconds
  • Memory Usage 1,723KB
  • 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
  • (2)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete