DataSSL Panel v2 Yayında! — Yeni DataSSL Panel v2 ile daha modern, hızlı ve kullanıcı dostu bir deneyim sunuyoruz.Yenilikler:Modern ve responsive ta...
Anasayfa İletişim
EN EN

HTTPS Zorunlu Yönlendirme Ayarları

HTTPS yönlendirme, SSL redirect, force HTTPS

HTTP → HTTPS Yönlendirme

SSL sertifikası kurduktan sonra tüm HTTP trafiğini HTTPS'e yönlendirmeniz gerekir.

Apache (.htaccess)

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

Nginx

server {
    listen 80;
    server_name example.com www.example.com;
    return 301 https://$server_name$request_uri;
}

IIS (web.config)

<rewrite>
  <rules>
    <rule name="HTTPS Redirect" stopProcessing="true">
      <match url="(.*)" />
      <conditions>
        <add input="{HTTPS}" pattern="off" />
      </conditions>
      <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="Permanent" />
    </rule>
  </rules>
</rewrite>

PHP

if (!isset($_SERVER["HTTPS"]) || $_SERVER["HTTPS"] !== "on") {
    header("Location: https://" . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"], true, 301);
    exit;
}

WordPress (wp-config.php)

define('FORCE_SSL_ADMIN', true);
define('WP_HOME', 'https://example.com');
define('WP_SITEURL', 'https://example.com');

Bu makale faydalı oldu mu?

Makale Ara

Güvenlik & En İyi Uygulamalar

Yardıma mı İhtiyacınız Var?

Aradığınızı bulamadıysanız destek ekibimiz size yardımcı olabilir.

Destek Talebi Aç