N
N
Nikidze2020-08-06 13:39:44
htaccess
Nikidze, 2020-08-06 13:39:44

How to make such a redirect through .htaccess?

How to make a proper redirect from example.com and www.example.com and https://www.example.com to https://example.com ?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
roswell, 2020-08-06
@roswell

RewriteEngine On
RewriteCond %{SERVER_PORT} !^443 [OR]
RewriteCond %{HTTP_HOST} !^example\.com [NC]
RewriteRule (.*) https://example.com/$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