Skip to content

Instantly share code, notes, and snippets.

View SalmanRavoof's full-sized avatar
🎯
Focusing

Salman Ravoof SalmanRavoof

🎯
Focusing
View GitHub Profile
@SalmanRavoof
SalmanRavoof / .htaccess
Created October 9, 2019 20:40
Alternative way to force any HTTP request to redirect to HTTPS by adding the first three lines to your WordPress .htaccess file.
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.example.com/$1 [R=301,L,NE]
# Please make sure to replace the example.com domain name in line 3 with your own
# BEGIN WordPress
# END WordPress
@SalmanRavoof
SalmanRavoof / .htaccess
Created October 9, 2019 21:13
Force any HTTP request to redirect to HTTPS by adding the first three lines to your WordPress .htaccess file. The next part is WordPress' way of handling Pretty Permalinks.
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE]
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
@SalmanRavoof
SalmanRavoof / .htaccess
Created October 9, 2019 21:14
Alternative way to force any HTTP request to redirect to HTTPS by adding the first three lines to your WordPress .htaccess file. The next bit is WordPress' way of handling Pretty Permalinks.
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.example.com/$1 [R=301,L,NE]
# Please make sure to replace the example.com domain name in line 3 with your own
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
<html>
<head>
<style>
/* kinsta-banner is used on the homepage only */
.kinsta-banner { font-size: 150% }
.kinsta-banner { width: 75% }
</style>
</head>
<body>
<!-- kinsta banner START -->