How to redirect HTTP to HTTPs via .htaccess file پرینت

  • ssl, https, redirect
  • 12

Question: How to redirect website from HTTP to HTTPs?

Answer: To permanently redirect website from HTTP to HTTPs you need to create .htaccess file in website's folder with the following content:

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]


آیا این پاسخ به شما کمک کرد؟

« برگشت