Photo by Austin Distel on Unsplash

Photo by Anete Lūsiņa on Unsplash

Photo by Fotis Fotopoulos on Unsplash

Force www

RewriteEngine on
RewriteCond %{HTTP_HOST} ^example\.com [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301,NC]
RewriteCond %{HTTP_HOST} !^$
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteCond %{HTTPS}s ^on(s)|
RewriteRule ^ http%1://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

Force non-www

RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.example\.com [NC]
RewriteRule ^(.*)$ http://example.com/$1 [L,R=301]
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.
RewriteCond %{HTTPS}s ^on(s)|off
RewriteCond http%1://%{HTTP_HOST} ^(https?://)(www\.)?(.+)$
RewriteRule ^ %1%3%{REQUEST_URI} [R=301,L]

Force HTTPS

RewriteEngine on
RewriteCond %{HTTPS} !on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
<IfModule mod_headers.c>
# Remove "includeSubDomains" if you don't want to enforce…

Photo by Clément Hélardot on Unsplash

Photo by Fotis Fotopoulos on Unsplash

Photo by Sara Kurfeß on Unsplash

1. Adjust Your Tweet Character Size


Photo by Glenn Carstens-Peters on Unsplash

1. Advertising


Photo by Kelvin Ang on Unsplash

Install Apache Tomcat 7

sudo apt-get update
sudo apt-get install tomcat7 tomcat7-docs tomcat7-admin tomcat7-examples
http://<ip address>:8080

Brandon Himpfen

Open source. Travel. Photography. https://www.himpfen.com/

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store