Awesome List Updates on Feb 09, 2015

7 awesome lists updated today.

🏠 Home · 🔍 Search · 🔥 Feed · 📮 Subscribe · ❤️ Sponsor

1. Awesome Javascript

Loaders

2. Awesome Remote Job

Articles & Posts

3. Awesome Ruby

Natural Language Processing

4. Awesome Talks

Functional Programming

5. Awesome Elixir

Eventhandling

Examples and funny stuff

HTTP

6. Htaccess

Rewrite and Redirection / Force HTTPS Behind a Proxy

Force HTTPS Behind a Proxy

Useful if you have a proxy in front of your server performing TLS termination.

RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

Rewrite and Redirection / Alias a Single Directory

Alias a Single Directory

RewriteEngine On
RewriteRule ^source-directory/(.*) /target-directory/$1 [R=301,L]

Rewrite and Redirection / Alias “Clean” URLs

Alias “Clean” URLs

This snippet lets you use “clean” URLs -- those without a PHP extension, e.g. example.com/users instead of example.com/users.php.

RewriteEngine On
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^([^.]+)$ $1.php [NC,L]

Source

Security / Deny Access to Hidden Files and Directories

Deny Access to Hidden Files and Directories

Hidden files and directories (those whose names start with a dot .) should most, if not all, of the time be secured. For example: .htaccess, .htpasswd, .git, .hg...

RewriteCond %{SCRIPT_FILENAME} -d [OR]
RewriteCond %{SCRIPT_FILENAME} -f
RewriteRule "(^|/)\." - [F]

Alternatively, you can just raise a “Not Found” error, giving the attacker no clue:

RedirectMatch 404 /\..*$

Miscellaneous / Switch to Another PHP Version

Switch to Another PHP Version

If you’re on a shared host, chances are there are more than one version of PHP installed, and sometimes you want a specific version for your website. The following snippet should switch the PHP version for you.

AddHandler application/x-httpd-php56 .php

# Alternatively, you can use AddType
AddType application/x-httpd-php56 .php

7. Awesome Courses

Courses / Machine Learning