To enable mod_rewrite on an Apache server, you generally need to enable the module and then configure the rewrite rules in a .htaccess file or in the server configuration. First, make sure the mod_rewrite module is installed and enabled with sudo a2enmod rewrite on Debian/Ubuntu-based systems, or by checking the configuration on other systems. Then, in your .htaccess file or server configuration, use the RewriteEngine On directive to enable rewrites and define case-specific rules, for example, to create friendly URLs or redirect traffic. Detailed steps: Verify and install mod_rewrite (if necessary): On Debian/Ubuntu-based systems (such as Ubuntu, Mint, etc.), use the following command to enable the module: Code sudo a2enmod rewrite If it's already enabled, it will prompt you. On other systems, consult your Apache distribution's documentation to see how to enable the module. Some systems may have it enabled by default. Restart Apache for the changes to take effect: Code sudo systemctl restart apache2