Skip to content

Instantly share code, notes, and snippets.

Avatar
Available for hire

Joost Hoogendoorn j3th9n

Available for hire
View GitHub Profile
View osx-for-hackers.sh
#!/bin/sh
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
green='\033[0;32m'
@j3th9n
j3th9n / .htaccess
Created Apr 24, 2018 — forked from vielhuber/.htaccess
Apache: htaccess force www and https ssl #server
View .htaccess
# force HTTPS and www.
RewriteEngine On
RewriteCond %{HTTP_HOST} (?!^www\.)^(.+)$ [OR]
RewriteCond %{HTTPS} off
RewriteRule ^ https://www.%1%{REQUEST_URI} [R=301,L]
# alternative way
RewriteCond %{HTTP_HOST} !^$
RewriteCond %{HTTP_HOST} !^www\. [NC]
@j3th9n
j3th9n / .htaccess
Created Nov 7, 2018
HTTP to HTTPS rewrite rule
View .htaccess
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]