Welcome to the forums.
If you have access to Apache2's configuration files in /etc/apache2/sites-enabled/ then you don't have to mess with .htaccess. The file .htaccess is used only in occasions you aren't able to change the configuration file directly. When you change the configuration file, you have the advantage that all the changes are in the same place.
That said, the way to change the configuration file is to use the module rewrite. First turn on the module if it is not already on.
Code:
sudo a2enmod rewrite
sudo service apache2 restart
Then you can make your changes to your configuration file. The changes go in between the <VirtualHost> tags to apply to the whole site, or between <Directory> tags to apply to a certain directory.
Code:
RewriteEngine on
Redirect /old.html /new.html
Bookmarks