How do I redirect only index.php URLs to subdomain with htaccess/mod_rewrite?


I moved a XenForo installation to a subdomain and I need to redirect the old index.php links to the subdomain, for example:

Redirect this:
to this:

But I don't want to redirect anything other than index.php because there are other things that still need to be accessible, for example

I couldn't find an exact answer or figure out how but perhaps someone here knows how to do this so it can be done sooner