G
G
Gennady Sokolsky2016-07-22 01:30:59
htaccess
Gennady Sokolsky, 2016-07-22 01:30:59

How to redirect from mail.domain to httpS://.domain?

1. В настройках ISP Manager 5 WWW-домены отключил Перенаправлять HTTP-запросы в HTTPS
2 htaccess прописал

#Redirecting www.domain.com and https://www.domain.com to https://domain.com
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^(.*)$ https://%1%{REQUEST_URI} [L,R=301]
# Redirecting domain.com to https://domain.com
RewriteCond %{HTTPS} off
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Теперь делает редирект на прямую к https://domain.com.

But, the redirect from mail.domain.com to https://domain.com does not work - I'm afraid it will create duplicates of the site
Although it works fine from www.domain.com to https://domain.com

Tell me what to add for the mail.domain redirect .com?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question