0

Bitnami WordPress Multisite on AWS EC2 instance, Ubuntu 16.04, Apache 2.4.39

Want to use the Redirect directive inside VirtualHost sections in /opt/bitnami/apache2/conf/extra/httpd-vhosts.conf to redirect old-site/old-page to new-site/new-page

Here's what I have right now

<VirtualHost *:80>
  ServerAdmin webmaster@old-site.com
  DocumentRoot "/opt/bitnami/apps/wordpress/htdocs"
  ServerName www.old-site.com
  ServerAlias old-site.com
  Redirect permanent /old-page/ https://new-site/new-page/
  Redirect permanent /old-page https://new-site/new-page/
</VirtualHost>

<VirtualHost *:443>
  SSLEngine on
  SSLCertificateFile "/opt/bitnami/apache2/conf/primary-site.com.crt"
  SSLCertificateKeyFile "/opt/bitnami/apache2/conf/primary-site.com.key"
  ServerAdmin webmaster@old-site.com
  DocumentRoot "/opt/bitnami/apps/wordpress/htdocs"
  ServerName www.old-site.com
  ServerAlias old-site.com
  Redirect permanent /old-page/ https://new-site/new-page/
  Redirect permanent /old-page https://new-site/new-page/
</VirtualHost>

Have tried many variations, and always the only one that works is the redirect from http://old-site/old-page/

From these three it does not work: http://old-site/old-page https://old-site/old-page/ https://old-site/old-page

It just displays old-site/old-page/ (that is, the contents of that page)

Any suggestions would be greatly appreciated!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.