Apache ModRewrite Problem

Posted on November 13th, 2009 in PHP by Russ

Ok, here’s a perplexing one.

If (cookie does not exist) AND (cache file exists) THEN redirect user.
[code]
RewriteCond %{HTTP_COOKIE} !^.*cookiename.*$ [NC]
RewriteCond %{REQUEST_URI} ^/?original/page/
RewriteCond -s other/page/index.html
RewriteRule .* other/page/index.html [L]
[/code]

Result: 404, file (/original/page/) does not exist (note that /original/page is itself a redir).

So … what am I doing wrong?

Automatic Updated Services

Posted on November 3rd, 2009 in PHP by Russ

After finding out how easy it was to update my twitter status from a script, or to send direct messages, I’ve got several processes that will send me a twitter DM when they’re done. Real Estate updating script finished? It “pings” me. Server offline? Nagios “pings” me. Or it’ll just update its status and I’ll follow it in my RSS reader.

And now I’ve discovered “posterous.” and Posterous will feed an RSS feed.. so I could email Posterous (post at posterous dot com), and follow that on an RSS reader and whammo, it’s all done too. More content allowed … maybe a full php error handler? Who knows. Yeah I know I’m cheap for not shelling out for HopToad, but that’s what we get with bills like mine.