You can enable support for SEO friendly URLs in Apache by using a module called mod\_rewrite. Here’s how to do it:
1. Enable mod\_rewrite
First, you need to enable mod\_rewrite module in Apache. This can be done by using the `a2enmod` command in your terminal: \`\`\` sudo a2enmod rewrite \`\`\` After executing this command, you need to restart the Apache server to apply changes: \`\`\` sudo service apache2 restart \`\`\`1. AllowOverride directive
Next, you need to allow the use of `.htaccess` files within your website’s directory. This is done by changing the `AllowOverride` directive from ‘None’ to ‘All’. Open the default Apache configuration file: \`\`\` sudo nano /etc/apache2/sites-available/000-default.conf \`\`\` Inside that file, you will see a `1. Create .htaccess file
Now you can create a `.htaccess` file in the root directory of your website. The `.htaccess` file will allow you to start creating SEO friendly URLs, such as redirecting old page URLs to new ones, removing file extensions, or creating pretty permalinks. A simple example of a rewrite rule in a .htaccess file: \`\`\`apache RewriteEngine On RewriteRule ^about$ /about.php [L] \`\`\` This rule allows users to navigate to www.yourwebsite.com/about instead of www.yourwebsite.com/about.php, which is friendlier for both Users and Search Engines.