Password protect a subsite in a WordPress network with .htaccess

A wordpress network / multisite setup uses virtual directories.

When you have a wordpress network setup on www.yourdomain.com, you can have multiple blogs with only one WordPress installation, for example:

www.yourdomain.com
www.yourdomain.com/johndoe
www.yourdomain.com/janedoe

Suppose you want to password protect only one subsite e.g. ‘janedoe’, you can’t just create a ‘janedoe’ folder on your webserver with a particular .htaccess in it.

You need to create a secured environment for the virtual folder in your main .htaccess (where all other WordPress rules reside) using the following code:

SetEnvIfNoCase Request_URI "^/janedoe/" SECURED
AuthType Basic
AuthName "restricted area"
AuthUserFile /home/mydomain/.htpasswd
require valid-user
Satisfy any
Order allow,deny
Allow from all
Deny from env=SECURED

Enable Apache Error Logging for Mod_Rewrite in Xampp

Mod_Rewrite enables you to do fancy stuff with URLs, but it isn’t always transparent when it comes to debugging. In a development environment it can be useful to enable apache error logging to see where a mod_rewrite line fails.

In XAMPP you can do this by opening httpd.conf (open control panel > config > Apache (httpd.conf)) and append mod_rewrite.c:trace3 to LogLevel.

LogLevel warn mod_rewrite.c:trace3

Social Media Jongeren Onderzoek 2014

Facebook groeit nog steeds, Twitter op de weg terug

Voor het vijfde jaar heeft Newcom Research & Consultancy het Nationale Social Media Onderzoek uitgevoerd. Binnen het onderzoek van 2014 zijn 1.116 jongeren tussen de 15 en 19 jaar gevraagd naar hun gedrag op social media.

via Social Media Jongeren Onderzoek 2014 – Newcom Research

24 Season 9: Jack Is back! May, 5th 2014

Jack is back to live another day. 24:Season 9 starts on the 5th of May on FOX. Follow news on twitter via #JackIsBack (and don’t forget, Cloe O’Brian is back too!)

Heroic agent Jack Bauer attempts to thwart an unthinkable terrorist attack in London that could change the world forever.

http://www.youtube.com/watch?v=fo4_r5RlBII