I want to redirect all traffic from my blog.oldsite.com to blog.newsite.com
eg:
- blog.oldsite.com => blog.newsite.com
- blog.oldsite.com/page1 => blog.newsite.com/page1
I have followed this document:
Added the highlighted section:
sudo vim /etc/apache2/sites-available/000-default.conf
And then added the following line to:
sudo vim /var/www/html/.htaccess
And finally under my old site directory: /var/www/blog.oldsite.com
sudo vim .htaccess
Added the highlighted section:
Now I correctly get the following redirect:
- blog.oldsite.com => blog.newsite.com
But the following requested is not redirected:
- blog.oldsite.com/page1 => blog.oldsite.com/page1
Not sure why the paths are not getting redirected correctly?