Insidethe.com

Insidethe.com

Random Life and Technology Bits

Bookmark – Apache URL Rewrite to Control Access

Was looking for some quick examples to block access to URL’s based on a rewrite rule and found this blog post: http://www.netshinesoftware.com/blog/restricting-access-to-a-url-by-ip-address-using-mod-rewrite/ I’m copying the best bits here for easy reference.

Redirect traffic from specific hosts with specific query string
RewriteEngine On
RewriteCond %{REMOTE_ADDR} ^123\.255\.123\.255 [OR]
RewriteCond %{REMOTE_ADDR} ^124\.255\.124\.255 [OR]
RewriteCond %{REMOTE_ADDR} ^125\.255\.125\.255
RewriteCond %{QUERY_STRING} option=com_my_special_component [NC]
RewriteRule ^(.*)$ index.php [F,L]
Don’t redirect traffic from these hosts with specific query string
RewriteEngine On
RewriteCond %{REMOTE_ADDR} !^123\.255\.123\.255
RewriteCond %{REMOTE_ADDR} !^124\.255\.124\.255
RewriteCond %{REMOTE_ADDR} !^125\.255\.125\.255
RewriteCond %{QUERY_STRING} option=com_my_special_component [NC]
RewriteRule ^(.*)$ index.php [F,L]

Sending Video to Grandma and Grandpa Through KakaoTalk

Sending video of the first and only grandchild to grandma and grandpa is somewhat of a challenge. Internet access is the primary limitation which is currently 3G data through their recently acquired smartphones. I got them setup using the KakaoTalk chat app for easily sending pictures and text messages back and forth. Using it for video was limiting because high quality videos were too short and longer, low quality videos, weren’t any good for anything besides sending through KakaoTalk.

After doing some experiments using Nero Record to down-size recorded HD video I found I could get over 3 minutes of decent quality video sent through KakaoTalk. This gave me the benefit of recording HD video for permanent record (i.e. burning to DVD) and being able to send a reasonably long video through KakaoTalk for easy access.

The following YouTube video is a walk through of the process.