PDA

View Full Version : Creative solution needed: Splitting a site in two, how to redirect half?


sub_ubi
08-18-2017, 03:38 AM
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
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!