How can RewriteCond be utilized to add conditions to mod_rewrite rules in PHP?
To add conditions to mod_rewrite rules in PHP, you can use the RewriteCond directive in your .htaccess file. This allows you to specify additional conditions that must be met before the RewriteRule is applied. This can be useful for creating more complex rewrite rules based on various criteria such as the user agent, IP address, or request method.
```php
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} ^Mozilla.*
RewriteRule ^page1\.html$ page2.html [L]
```
In this example, the RewriteCond directive checks if the user agent starts with "Mozilla" before applying the RewriteRule. If the condition is met, the request for "page1.html" is redirected to "page2.html".