XF 2.0 Creative solution needed: Splitting a node into its own domain, how to redirect?

sub_ubi

Well-known member
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 how do we know if the thread was from that subforum? There's nothing in the thread URL which states the forum it's from, so a simple redirect won't work.

All ideas welcome!
 
Presumably there are too many threads to list them individually in a redirect, but Iif that is the only solution, I would evaluate how many actually need redirecting -how many with backlinks from external sites, and how many with internal links.

Any without those links you don't need to worry aboiut really as Google etc. will soon pickup up and relist the new URL.

If it has to be done manually, it could be hours of work, but is basically unskilled so you could outsource it to fiverr or something similar.


EDIT: but hopefully there is a way to do it automatically, someone more knowdegaeble me may hopefuylly step up to the mark for that.
 
@sub_ubi

The forum node ID is in the HTML attribute of each page within the forums.

So if you just want to do a blanket redirect to one URL (i.e. your new domain/site) for ALL topics within a given node, you can wrap a XenForo conditional around a meta refresh snippet:
Code:
<xf:if is="$forum.node_id == x">
<meta http-equiv="refresh" content="0;URL='https://www.google.com/'" />  
</xf:if>
https://xenforo.com/community/resources/conditional-statements-for-xenforo-2.5795/
 
Top Bottom