Home .htaccess - redirect from old domain to new and force HTTPS
Reply: 0

.htaccess - redirect from old domain to new and force HTTPS

user719
1#
user719 Published in May 25, 2018, 11:11 am

I'm having trouble getting these redirects to work under all conditions. I'm hoping I can fix it with .htaccess but there may be something mucked up with the way I'd previously tried to force redirects through my host's control panel.

Anyway, olddomain.com/whatever, with http:// or https:// and with or without www should permanently redirect to https://www.newdomain.com/whatever.

At one point I had everything except https://olddomain.com redirecting properly. Now I've broken it and I'm just getting the too many redirects error.

I believe both domains have a Let's Encrypt certificate attached to them. The old domain doesn't need to be secured if that makes a difference.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.304329 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO