mod_rewrite is deep magic

When I moved this blog from MovableType to WordPress, the rss feed urls changed. Since I didn’t want the livejournal syndication to break, I put in mod_rewrite RewriteRules to redirect those feed urls. When I upgraded to WordPress 2.0, what had been an extremely long .htaccess became just a few lines long, and all the fancy stuff that they used to do in .htaccess with mod_rewrite are now evidently done in index.php itself. So I’m trying to figure out how to insert new RewriteRules to do what I did before, but everything I try either does nothing, or it causes the whole blog to break with a message in the error.log file saying “mod_rewrite: maximum number of internal redirects reached. Assuming configuration error.”

Here is the existing .htaccess:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /blogs/pt/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blogs/pt/index.php
</IfModule>

I would have thought that adding the following would be sufficient:

RewriteRule index.rdf /blogs/pt/feed/
RewriteRule index.xml /blogs/pt/feed/

or possibly, since /feed/ is evidently going to be passed to index.php as arguments, like this:

RewriteRule index.rdf /blogs/pt/index.php?&feed
RewriteRule index.xml /blogs/pt/index.php?&feed

I also tried with [L] and/or [R] conditions. No luck.

I’d like to get all those syndicators working again. If you have any suggestions, please leave a comment or drop me an email.

Ok, that’s annoying

I upgraded to WordPress 2.0 a few days ago.  I just noticed today that the comment count isn’t incrementing when people post comments (although they do decrement when I delete a test comment).  So there’s all those posts on my main page that say “Comments (0)” even though they have comments.  And they’re not showing up in my “unread comments” plugin either.

I think I’m going to have to try turning off some plugins to see if that makes a difference.  I hope it’s not SpamKarma.

If you ever see me…

…pick up a pair of vice grips and head towards the bathroom, just shoot me. I just can’t seem to get it right.

The downstairs powder room sink drains really slowly, and Vicki says it started after the carolling party. I tried plungering it, and didn’t help. (Plungering sinks is a bit of a waste of time anyway, because all it does it blow water out of the overflow hole.) So I tried taking the trap off. Didn’t find anything blocking it, so I tried to put it back on. And I couldn’t get the damn thing to stop leaking no matter how hard I tightened it. Then I discovered that in tightening it, I’d managed to knock a big chunk out the the trap. So I went to the hardware store to buy a replacement trap.

While I was there, I picked up a replacment for the handle and arm of the upstairs en-suite toilet. The current one keeps falling off the arm thingy all the time.

When I got home, I put the trap on, but because I forgot to buy teflon tape it still leaks a bit. And of course it didn’t fix the real problem – the blockage is evidently further down.

Then I tried the replacement for the handle. The existing one has a bend in it, but when I tried to bend the new one, I bent it at one of the holes and broke it. So off I went to the hardware store, and bought the exact same type again. And when I carefully bent it at the non-hole part, it broke again. Of course it wasn’t until then that Vicki mentioned to me that there are bendy type arms and non-bendy type arms. Who knew?

Rather than making ANOTHER trip to Myers hardware, I pushed the existing handle on the existing arm on as hard as I could, and hoped that can hold for a while.

If you don’t hear from me after today…

…it’s because I’ve had to commit Seppuku to appease our Japanese customers.

A few days ago, based on a code review (which I unfortunately did on our 5.0 code base instead of the 3.6 code that they are using) and an examination of the customer logs, I confidently said that this mysterious changing value that they are seeing is due to one of them mucking around with changing values in Webmin. I found at least one case where that had happened, and like House my default assumption is that the user is always lying, because that’s usually the case. My confidence was reported up the line by my boss, and from him to the Japanese support people, and from them to the customer.

So yesterday I was taking another look at the logs, and I found that as well as the case where they had messed around with the values themselves, I found another case where the values had changed “spontaneously”. Oh oh. And then I remembered the cache of these values I’d put in in 3.1, and how hard it had been to get everybody who used the cache to understand that if they used the cache they had to listen for a particular message, and when they got that message they had to call a method to flush and reload the cache, and how some of the other developers don’t seem to get the concept of Singletons and how something they call in one thread can affect something that happens after that thread is dead and another one spawned off, and because of that in 4.0 I’d gotten rid of the cache entirely.

After apologizing, I’m going to have some backporting to do.

Why is it that when called on to apologize to the touchy Japanese customers I feel this Basil Fawlty voice in the back of my mind saying “Don’t mention the war” over and over again? I have trouble reconciling the delicate sensibilities of the Japanese and with the brutal butchers who bayonetted Canadian nurses in Hong Kong at Christmas 1941 or who casually beheaded surrendered prisoners being force marched in Bataan. I guess that’s not very culturally sensitive of me.