使用前缀重写Apache URL

使用前缀重写Apache URL,apache,Apache,我正在尝试重写apache服务器上的url。 我想要的是用regex替换类似的url。 例如,test.com/abcdef.php->test.com/124abcdef.php(如果是abc,前缀是123) test.com/defdef.php->test.com/456defdef.php(如果是def,前缀是456) 谢谢

我正在尝试重写apache服务器上的url。 我想要的是用regex替换类似的url。 例如,test.com/abcdef.php->test.com/124abcdef.php(如果是abc,前缀是123) test.com/defdef.php->test.com/456defdef.php(如果是def,前缀是456)

谢谢