XF 2.0 Redirection to index.php

Jake B.

Well-known member
There are certain resources we're trying to use outside of XenForo that require us to initialize XenForo, running the public App triggers a redirect to /index.php if friendly URLs are enabled, trying to track down where this redirect occurs as this is causing us some issues currently
 
Just bumping to see about getting this tracked down, did quite a bit of digging but couldn't find where this is happening :\
 
Alright, managed to track it down to being triggered by $r->setIndexRoute($c['options']->indexRoute ?: 'forums/'); in the router.public container. I don't believe I need this to be initialized for my specific uses, so I've removed it and it seems to have solved this issue, for now at least -- only downside so far seems that any links to the default route are linking to the full URL, but I think that's okay, at least until I get some of the other issues ironed out -- then I'll able able to address this one :)

Edit: Might've just been over thinking this.. I'm apparently triggering \XF\Pub\Controller\Index which is triggering the redirect. I think I just need a way to prevent XF's router from actually handling routing, but still being able to handle link generation
 
Last edited:
Back
Top Bottom