Linux Mint 17.3 Rosa Apache Rewrite Setup
Hi! The Tutorial shows you Step-by-Step How to Enable the Apache2 Rewrite Module on Linux Mint 17.3 Rosa Mate/Cinnamon/KDE/Xfce Desktop.
The mod_rewrite Module uses a Rule-based Rewriting Engine, based on a PCRE Regular-Expression Parser, to Rewrite requested URLs On the Fly. By default, mod_rewrite maps a URL to a Filesystem Path. However, it can also be used to Redirect One URL to Another URL, or to invoke an Internal Proxy Fetch.
Apache mod_rewrite provides a flexible and Powerful way to manipulate URLs using an Unlimited Number of Rules. Each Rule can have an Unlimited Number of Attached Rule Conditions, to allow you to Rewrite URL based on Server Variables, Environment Variables, HTTP Headers, or Time Stamps.
-
Open a Command Line Terminal emulator window
(Press “Enter” to Execute Commands)In case first see: Terminal QuickStart Guide.
-
Enabling Apache2 Rewrite Module.
sudo su -c "a2enmod rewrite"
If Got “User is Not in Sudoers file” then see: How to Enable sudo
-
To Setup an Apache2 Virtual Host for Rewrite.
sudo su -c "nano /etc/apache2/sites-available/[myDomainName].conf"
Append inside the VirtualHost Section:
<Directory /var/www/html/[mySite]> Options Indexes FollowSymLinks AllowOverride All </Directory>
Ctrl+Shift+v to Paste Content on nano
Ctrl+x to Save and Exit from nano Editor :) -
Restart Apache2 Web Server.
sudo service apache2 restart
How to Install LAMP Server on Linux Mint.
How to Create an Apache 2 Virtual Host on Linux Mint.
How to Install APC PHP Accelerator on Linux Mint