D
D
dimanche2017-09-22 19:18:58
Digital certificates
dimanche, 2017-09-22 19:18:58

Subdomain redirect to https via htaccess?

How to redirect a subdomain to https via htaccess?
There is a site kolorit-l.com, you need to redirect the assets.kolorit-l.com subdomain

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladimir Mukovoz, 2017-09-22
@castomi

If you make a mistake, don't kick me, I'm nginxvod))

RewriteEngine On
RewriteCond %{SERVER_NAME}%{SERVER_PORT} ^assets.kolorit-l.com80$
RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]

M
Marsin, 2021-03-22
@Marsin

<IfModule mod_rewrite.c>
RewriteEngine On

RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question