Archive for Uncategorized

The Challenge Is Motivation, Focus, and Effort

I should probably give an update on what I’m up to. I have not yet done so on my blog, and since this is my blog, it’s only appropriate that I at least explain something.

In January of 2008, I left my job at Microsoft to start a software company with Henry Cipolla, a classmate from my days at Boston University and also an ex-Microsoft employee. What we aim to develop is mostly a secret for now, but it will be on the web, and it will be targeted at consumers. It will rely on the wealth of social information hitting the web, and it will hopefully profoundly impact the lives of my family, friends, colleagues, and everyone else.

Read the rest of this entry »

Comments

Wordpress and .htaccess Password Protected Directories

I tried to make a password protected directory using a .htaccess file earlier today and found out that the root Wordpress .htaccess file causes a little trouble.

The situation looks something like:

  • /
    • .htaccess <- From Wordpress
  • /ProtectedDir
    • .htaccess <- My file

As of Wordpress 2.3.2, its .htaccess file looks like this:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

This lives at the base of Wordpress install, which for me happens to be the root of my web site. The rewrite rule throws any URL that leads to a non-existent file to Wordpress’ index.php. This lets Wordpress do search engine friendly URLs and custom 404 handling.

The problem here is subtle. In order to do password authentication, the web server needs to serve up a “401 Unauthorized” header and optionally an error document. My server defaults to a specific error document path, but I have not created a document at that path. However, Apache still passes the predefined 401 document path through the rewrite rules in an attempt to use it. Since it doesn’t exist, the request gets snagged by the Wordpress rewrite rules and index.php. The end result is that what should have been a 401 page now turns into a 404 and you can’t authenticate to the directory.

The solution is simple: override the non-existent, predefined error document path using the ErrorDocument directive in either of the .htaccess files mentioned above.

You have several options. You can either use Apache’s default hard-coded string for the error document by specifying:

ErrorDocument 401 default

Or you can use your own hard-coded error string:

ErrorDocument 401 "Unauthorized access"

Or you can create a 401 document and point the server to it like so:

ErrorDocument 401 /401.html

Pick one of those methods and your password authentication should work. Remember, the error document file must exist if you pick the last method.

Note that the same problem can occur with other HTTP error codes, so be on the lookout for other situations where Wordpress might bite you.

Updated Jan. 27 thanks to a suggestion made in this web forum post.

Comments (8)

Physics in Flash

Coincidentally, Adi and I were just talking about physics engines in Silverlight the other day, then I spotted these two posts on Reddit about physics engines in Flash:

  1. xavierenigma’s next physics game - This one incorporates objects with hard joints, but has no other features yet.
  2. Flash Doodle - Includes anchor points, bubbles with upward force, squishy lines, loose lines (rope). Lacks hard joints. 

Comments

Statistics about Americans

Time Magazine has an interactive representation of some statistics about Americans on their web site. How much do we drink? How much free time do we have? How happy are we on the job? How much time do we spend commuting? These are some of the stats they show. I particularly like the ”City Population Shift” tab on the Commute map. It shows you how people shift in and out of major cities during the day/night cycles.

Also, as an interesting aside, I managed to find a draft version of this piece. It looks like Time forgot to remove it. Check out the broken version here.

Comments

Giving Stuff Away on the Internet by Scott Adams

I found an article on the Wall Street Journal’s web page titled “Giving Stuff Away on the Internet.” It’s written by Scott Adams, creator of the Dilbert comics. The arcticle is a well written piece about problems Adams faced “giving stuff away” for free on his blog and web sites, especially where it concerns his non-Dilbert work.

Comments

Cross Country Trip a Success

Finished the trip at about 9pm eastern time today, making for a total travel time of four and a half days. I’ll post some pictures soon along with links to travel logs on the Pansy Patrol web site courtesy of Henry and Clint (whom I traveled with on the trip).

Comments

Starting My Cross Country Trip

I’m off on my cross country trip going from Seattle to Boston. The trip should take me five to six days, and I’m doing it with two friends and four vehicles between us. I’ll try and snap some pictures along the way.

Comments

Flowchart to tell if a web site is good or bad

I wouldn’t normally post this, but the Web 2.0 comment got me to laugh: flowchart for determining if a web site sucks.

Comments

James Howard Kunstler: The tragedy of suburbia

Here is an amazingly cynical but extremely truthful presentation given by James Howard Kunstler regarding suburban development in America. This was given at the 2004 TED conference. Visit the TED web site for more interesting videos.

About 6 minutes into the video there is a mention of Boston and the dismal design of Government Center. While I’m mostly a fan of the architecture in the downtown area, I agree with Kunstler complaints regarding that particular public space.

Comments

Building a Niche Minisite

I saw this tutorial today on Digg about how to build a niche minisite and make money doing it. The idea is to take a niche target, find some good keywords, make a mini-site, and use the minisite to push affiliate products, ads, etc. This isn’t a new concept by any means, but the tutorial breaks it down into some helpful steps. While you probably won’t get rich doing this, it can provide a small residual income.

The tutorial comes in two parts, check them out:

Comments

Close
E-mail It