我写的REWRITE规则,麻烦大家帮看下有什么遗漏或者效率问题,谢谢

目的很简单,当访问XXX.community.TEST.COM下的扩展名为PHP的文件时则REWRITE到community.test.com/PHP文件,而访问XXX.COMMUNITY.TEST.COM下扩展名为非PHP的文件的时候则REWRITE到community.test.com/xxx/非PHP文件,不知道这么写是否合适,是否会产生效率或者其他问题

<Directory "D:/test/community">
Options Indexes FollowSymLinks
AllowOverride All
</Directory>
<VirtualHost *:80>
    Rewriteengine on
    rewritecond %{HTTP_HOST} ^[^.]+\.community\.test\.com$
    rewriterule ^(.+) %{HTTP_HOST}$1 [C]
    rewriterule ^([^.]+)\.community\.test\.com(.*\.php) "/$2" [L]
    rewriterule ^([^.]+)\.community\.test\.com(.*) "/$1/$2" [L]
    ServerAdmin admin@test.com
    DocumentRoot "D:/test/community"
    ServerName community.test.com
    ServerAlias *.community.test.com
    ErrorLog logs/test.error.log
    CustomLog test.com-access_log common
</VirtualHost>