vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Redirect for Defunct Forum ID Number? (https://vborg.vbsupport.ru/showthread.php?t=161443)

jnr 10-29-2007 08:52 PM

Redirect for Defunct Forum ID Number?
 
In the course of reorganizing my forums, I created some new forums, moved various threads to them, and deleted the old forums.

Problem is, I now realize that this of course killed the links to those forums that I had included in a press release that I had previously published.

I see from an old thread on vBulletin.com (http://www.vbulletin.com/forum/showthread.php?t=158449) that it would be unwise to try to re-number forums (even if I knew how).

Is there any way to redirect requests for the old forums to the new ones?

Thanks for any help.

fringehead 10-30-2007 02:20 AM

You could try a redirect with .htaccess like this:

Redirect /olddirectory/oldfile.html http://yoursite.com/newdirectory/newfile.html

I have not used this with vb but edit the .htaccess file in your forum folder and see if it works. If you have problem just delete the entry (or the .htaccess file) but I think it will work.

Sean

jnr 10-30-2007 09:14 PM

Thanks Sean, but it doesn't work. Redirect doesn't parse the question mark or what comes after.

With a assist from Jake Bunce of the vBulletin team, who suggested I use the RewriteEngine, I tracked down the solution. I modified the code I found at http://www.webmasterworld.com/forum92/1917.htm. Here's an example of how to do it:

To redirect defunct link
http://www.greenmachines.net/forumdisplay.php?f=16

to
http://www.greenmachines.net/forumdisplay.php?f=31

put this in your .htaccess file:

Code:

Options +FollowSymlinks
RewriteEngine on
RewriteCond %{QUERY_STRING} ^f=16$
RewriteRule ^forumdisplay\.php$ http://www.greenmachines.net/forumdisplay.php?f=31 [R=301,L]

Quote:

Originally Posted by fringehead (Post 1371627)
You could try a redirect with .htaccess like this:

Redirect /olddirectory/oldfile.html http://yoursite.com/newdirectory/newfile.html

I have not used this with vb but edit the .htaccess file in your forum folder and see if it works. If you have problem just delete the entry (or the .htaccess file) but I think it will work.

Sean


fringehead 10-30-2007 11:50 PM

There is a lot you can do with .htaccess. I'm glad you figured it out. Find what to use is 98% of the battle! If I ever need to do what you did, it's now documented! Thanks for sharing what worked!

Sean


All times are GMT. The time now is 08:20 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.01243 seconds
  • Memory Usage 1,720KB
  • 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
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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