How can I use mod_rewrite to convert user-friendly URLs to PHP query strings?
To convert user-friendly URLs to PHP query strings using mod_rewrite, you can create a rewrite rule in your .htaccess file that rewrites the user-friendly URL to the corresponding PHP query string. This allows you to maintain clean and user-friendly URLs while still being able to process the requests using PHP. ```apache RewriteEngine On RewriteRule ^([^/]*)/([^/]*)$ /index.php?page=$1&action=$2 [L] ``` In this example, the user-friendly URL format is assumed to be `example.com/page/action`, which will be rewritten to `example.com/index.php?page=page&action=action`. You can then access the page and action values in your PHP script using `$_GET['page']` and `$_GET['action']`.