Utilizza una RewriteCond.

Comunque sarebbe meglio se tu postassi sul forum di Apache visto che non ha niente a che fare con il PHP.