Mengarahkan http ke https dengan menggunakan htaccess

Setelah melakukan instalasi SSL, agar website langsung mengarah ke https, anda perlu mengarahkan http ke https agar pengunjung website anda secara otomatis menuju ke https.

Berikut adalah cara Mengarahkan http ke https dengan menggunakan htaccess:

  • Silahkan login ke cpanel hosting anda
  • Silahkan buka file namager
  • Silahkan klik file .htaccess dan klik edit
  • Silahkan masukkan kode berikut:

RewriteEngine On

RewriteCond %{HTTPS} off

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

  • Klik tombol Save

Selesai

5/5 - (3 votes)
Chantika Putri

Recent Posts

Mengatasi error ‘tech_domains’ array in /etc/cpanel/ea4/ea4-metainfo.json contained only invalid or empty entries pada cpanel

Saat akses file manager ataupun DNS Zone Manager, keluar error seperti berikut: A warning occurred…

3 days ago

Cara Secure Partisi /tmp di WHM/Cpanel

cPanel & WHM juga menawarkan skrip bawaan yang memaksimalkan keamanan partisi /tmp. Hal ini dilakukan…

9 months ago

mengatasi error ImunifyAV has not detected any compatible hosting panel as well as integration.conf file to run the installation without a panel di cyberpanel

berikut adalah cara mengatasi error ImunifyAV has not detected any compatible hosting panel as well…

10 months ago

Update URL Repository Centos 7 Setelah End Of Life (EOL) 2024-07-01

CentOS 7 tidak akan mendapatkan pembaruan apa pun setelah Juni 2024. Selain itu, mirrorlist.centos.org tidak…

11 months ago

Mengatasi error gmysql Connection failed: Unable to connect to database pada pdns Cyberpanel

DNS di server cyberpanel tidak mau bekerja, di cek pada error log keluar pesan seperti…

11 months ago

Mengatasi Access denied for user ‘cyberpanel’@’localhost’ (using password: YES) saat upgrade cyberpanel

saat upgrade cyberpanel, keluar pesan error seperti berikut: django.db.utils.OperationalError: (1045, "Access denied for user 'cyberpanel'@'localhost'…

11 months ago