How can the .htaccess file be properly configured to handle URL parameters in PHP?

When using URL parameters in PHP, it's important to properly configure the .htaccess file to rewrite URLs in a user-friendly format. This can be done by using mod_rewrite rules to redirect URLs with parameters to a cleaner format that is easier for both users and search engines to understand. ```apache RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([^/]+)/?$ index.php?page=$1 [QSA,L] ```