How can the htaccess file be configured to properly handle $_GET variables in PHP?

When using $_GET variables in PHP, the htaccess file needs to be configured to rewrite URLs in a way that allows PHP to properly access the variables. This can be achieved by using the RewriteEngine directive to enable URL rewriting and the RewriteRule directive to specify the desired rewrite rules. ```apache RewriteEngine On RewriteCond %{QUERY_STRING} ^(.*)$ RewriteRule ^index.php$ /index.php?%1 [L] ```