How can rewrite conditions be used to test and troubleshoot mod_rewrite rules in PHP?

To test and troubleshoot mod_rewrite rules in PHP, rewrite conditions can be used to check specific conditions before applying the rewrite rule. This can help ensure that the rule is only applied when certain criteria are met, making it easier to identify and fix any issues with the rule.

```php
RewriteCond %{REQUEST_URI} !^/admin
RewriteRule ^(.*)$ index.php?page=$1 [L]
```

In this example, the RewriteCond directive checks if the requested URI does not start with "/admin". If this condition is met, the RewriteRule directive will rewrite the URL to pass the requested page as a parameter to index.php. This can help in testing and troubleshooting mod_rewrite rules by ensuring that the rule is only applied when the specified condition is true.