How to redirect url with unknown parameters to new url in .htaccess
20:47 21 Nov 2026

I have urls coming in like this:
mysite.com/analytics/*.php?id=10&uid=20

I need to redirect them to: *
analytics.mysite.com/*.php?id=10&id=20

The problem is that the part after /analytics/ can be anything. It could be view.php or edit.php or whatever.php and the query string can also be anything.

Not sure what is the cleanest way to write this in .htaccess
Any thoughts?*

.htaccess mod-rewrite