XF 2.1 Process rewritten route

Lukas W.

Well-known member
I'm investigating the feasibility of the current use case: XenForo is running in a subdirectory, but I'd like to expose some routes, such as the members page to the root domain, e.g. we're trying to make domain.com/community/members available under domain.com/members.

The mod rewrite we have is a pretty basic one:
Code:
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{REQUEST_URI} ^/members/(.*)
    RewriteRule ^(.*)$ community/members/$2 [L,QSA] # or RewriteRule ^(.*)$ community/index.php?members/$2 [L,QSA]
</IfModule>

Unfortunately XenForo isn't able to interpret it right, and just comes up with The requested page could not be found. (Code: invalid_route, controller: -, action: -) . I'm having a hard time understanding how XenForo actually processes routes, so I'm not sure if that's a fault in my rewrite, or simply not possible out of the box and would need an extension, or if an extension isn't even possible to begin with.

Similarly to incoming URLs, I'd also need to rewrite any outgoing URLs. I'm picturing an extension for the public router and a case-by-case replacement for the final URL, but maybe there's a more elegant way?
 
Top Bottom