How to renew certificate for redirected domain


#1

I’m not able to renew a certificate for a domain because it gets redirected to a different domain. Currently in the .htaccess file I have the following:

RewriteEngine on
Redirect permanent / https://myaccount.zendesk.com/

Is there any way to keep the domain redirected but also be able to renew the certificate for that redirected domain? I tried this but it didn’t work:

RewriteEngine On
RewriteRule ^\.well-known($|/) - [L]
Redirect permanent / https://myaccount.zendesk.com/

My server OS is CentOS Linux 7.5.1804, running Apache 2.4.6.

Thanks!


#2

Hi @MontyHu,

In this case you should not use Redirect, use another RewriteRule:

RewriteEngine on
RewriteRule ^\.well-known/ - [L]
RewriteRule (.*) https://myaccount.zendesk.com/$1 [R,L]

Cheers,
sahsanu


#3

That did it, thanks a lot!


#4

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.