Bu kodu sitenizin htaccess dosyasına eklediğinizde sitenize giren kişiyi otomatik olarak sitenizin https ve www içeren
versiyonuna yönlendirir.
Bu kod cloudflare ile çalışan siteler içindir.
# BEGIN Redirect to www & SSL
RewriteEngine On
# If CloudFlare headers are not set, rewrite bare domain to 'www':
RewriteCond %{HTTP:CF-Visitor} !scheme
RewriteCond %{HTTP_HOST} ^[^.]+\..{2,6}$
RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
# If CloudFlare headers are set, rewrite bare domain to 'www' via SSL:
RewriteCond %{HTTP:CF-Visitor} scheme
RewriteCond %{HTTP_HOST} ^[^.]+\..{2,6}$
RewriteRule ^ https://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
# If CloudFlare headers are set, rewrite non-SSL to SSL:
RewriteCond %{HTTP:CF-Visitor} '"scheme":"http"'
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
# END Redirect to www & SSL