I know there are already several posts asking about redirecting webpages but I can not seem to find exactly what I am looking for.
I have a website (for example www.example.com) that needs to be redirected:
Should all be redirected to www.example.com
I found Apache redirect from one domain to another domain but I am not sure how to add it to my file located in /etc/apache2/sites-available This is what the file currently looks like:
<VirtualHost *:80> ServerAdmin firstname.lastname@example.org DocumentRoot /var/www/example ServerName www.example.com ErrorLog logs/www.example.com-error_log TransferLog logs/www.example.com-access_log </VirtualHost>
Any help would be appreciated.