How can mod_rewrite in PHP be effectively used to redirect URLs with parameters to cleaner, more user-friendly URLs?

When using mod_rewrite in PHP, you can effectively redirect URLs with parameters to cleaner, more user-friendly URLs by creating rewrite rules in your .htaccess file. This allows you to mask complex URLs with parameters and present a simplified and more user-friendly version to your visitors.

```php
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^products/([0-9]+)/?$ product.php?id=$1 [NC,L]
```

In this example, the code snippet redirects a URL like `example.com/products/123` to `example.com/product.php?id=123`, providing a cleaner URL structure for users while maintaining the functionality of passing parameters to the PHP script.