vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Creative solution needed: Splitting a site in two, how to redirect half? (https://vborg.vbsupport.ru/showthread.php?t=325520)

sub_ubi 08-18-2017 03:38 AM

Creative solution needed: Splitting a site in two, how to redirect half?
 
I need some help brainstorming.

One of our subforums has outgrown the rest of the site, so we're splitting it off onto its own domain to become an entirely separate site.

Here's the tricky part: we want to redirect every thread from that subforum to the new domain, but leave all other threads/forums intact. There's nothing in the thread URL which states the forum it's from, so a simple redirect won't work.

There are tens of thousands of threads in that subforum. All ideas welcome

Stingray27 08-18-2017 11:53 PM

A simple bit of php on a showthread hook, to detect the forum, and redirect if necessary.

sub_ubi 08-19-2017 07:58 PM

Quote:

Originally Posted by Stingray27 (Post 2589436)
A simple bit of php on a showthread hook, to detect the forum, and redirect if necessary.

Brilliant, thank you

Dave 08-19-2017 08:29 PM

I recommend the hook showthread_getinfo which is called right after the requested thread is validated and exists.
From there you can use the $threadinfo variable.

sub_ubi 08-21-2017 11:51 PM

Even better!


All times are GMT. The time now is 07:05 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.01008 seconds
  • Memory Usage 1,712KB
  • 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_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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