How can mod_rewrite be used to make URLs look more aesthetically pleasing in PHP?

Mod_rewrite can be used to rewrite URLs in a more user-friendly and aesthetically pleasing way by converting dynamic URLs into static-looking URLs. This can improve the readability of URLs for users and make them more search engine friendly. By using mod_rewrite, you can create clean URLs that are easier to remember and understand.

```php
RewriteEngine On
RewriteRule ^products/([0-9]+)/?$ product.php?id=$1 [NC,L]
```

This code snippet uses mod_rewrite to rewrite a URL like "example.com/product.php?id=123" to "example.com/products/123/", making the URL more aesthetically pleasing and user-friendly.