Configuring Apache HTTPD with .htaccess
Rerouting from www
This trick is both for SEO and for personal gratification. I prefer to ditch the www
subdomain in the address bar. While that arguably means less these days, it will ensure that you are not splitting the search engine ranking for your site between the parent domain and the (nearly-always-offered-and-simultaneously-identical) www
subdomain which is generally available if you are using a common shared hosting service like 1&1 or GoDaddy.
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.davideldridge\.org$ [NC]
RewriteRule ^(.*)$ http://davideldridge.org/$1 [R=301,L]
Rerouting to https
I made the move to https
to placate the kind folks at Google. I understand that version 56 of their (Chrome) browser is going to have a warning letting users know that browsers are not secure if they are visiting a site without a certificate (plaintext/http/:80
). And I am pretty opinionated on this. In light of the things that we learned through Edward Snowden’s whistleblowing,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 I think that it is imperative that we secure all of our web traffic. So, while it is certainly an inconvenience for web developers, it is of vital interest to people generally that me make this transition. Having said that, here is at least one way to skin the cat of rerouting to the secure version of your site:
RewriteEngine on
RewriteCond %{HTTPS} off
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
References
- The Guardian - Edward Snowden: The Whistleblower Behind the NSA Surveillance Revelations ↑
- The Intercept - Inside the Assassination Complex: Whistleblowing Is Not Just Leaking, It’s an Act of Political Resistance ↑
- WIRED - Edward Snowden: The Untold Story ↑
- American Civil Liberties Union - Edward Snowden Is a Whistleblower ↑
- Democracy Now! - "Edward Snowden Is a Patriot": Ex-NSA CIA, FBI and Justice Whistleblowers Meet Leaker in Moscow ↑
- TED (ideas.ted.com) - Why Obama Should Pardon NSA Whistleblower Edward Snowden ↑
- The Huffington Post - Edward Snowden Is a ‘Whistle-Blower,’ Rep. Justin Amash Says ↑
- American Civil Liberties Union - Edward Snowden Is a Patriot ↑
- Salon - Daniel Ellsberg: Edward Snowden Is a Patriot ↑
- Rare - If Edward Snowden Isn’t a Whistleblower, There’s No Such Thing ↑
- Politico - Edward Snowden Is a Patriot ↑
- CNN - Eric Holder Says Edward Snowden Performed a 'Public Service' ↑
- Washington Post - Edward Snowden, Patriot ↑
- Huffington Post - Edward Snowden Is a Patriot ↑
- Politifact - Hillary Clinton Claims Edward Snowden Had Whistleblower Protections, Didn't Use Them [Mostly False] ↑