XF 1.1 Customize Rewrite Rules

How can i redirect some custom route prefixes to my new newindex.php file when full url rewrite is enabled?
What have i to change in the xenforo htaccess file?
Because i want to use my own frontcontroller.

Instead of using the event system and hack around with all the dependencies (request, response, xenforo router, etc...), i prefer to use my own entrypoint.

So all i want to do via htaccess is

if url is:

foobar.com/members => use newindex.php instead of index.php
foobar.com/baz => use newindex.php instead of index.php
foobar.com/bazinga => use newindex.php instead of index.php
everthing else should use the standard xenforo rewrite rules
This is working

RewriteRule ^members.*$ newindex.php [NC,L]

but I would prefer 1 line for everything instead of 1 line for each route prefix

Is there a way to do this?


^ members|links|avatar|api .*$ newindex.php
RewriteRule ^(members|links|avatar|api).*$ newindex.php [NC,L]

edit - but I still recommend using XenForo's addon system for this. Create a route and a route handler, and a controller.
Top Bottom