How can mod_rewrite be used to create virtual directory structures in PHP?
Mod_rewrite can be used to create virtual directory structures in PHP by rewriting URLs to point to specific PHP files or directories on the server. This allows for cleaner and more user-friendly URLs, as well as better organization of files on the server. By using mod_rewrite rules in the .htaccess file, you can achieve this functionality.
```php
RewriteEngine On
RewriteRule ^products/([0-9]+)/?$ products.php?id=$1 [NC,L]
```
In this example, any URL that starts with "/products/" followed by a number will be rewritten to "products.php?id=NUMBER". This allows for virtual directory structures to be created in PHP using mod_rewrite.