fix 1.6 permalinks

@lbod this is similar to what you were doing but without any of the changes to dapi.   See if you can break it.

Regardless of whether or not we switch dojotoolkit.org/api to node, this seems like a reasonable [short term] fix.

I made two versions, one just fixing the actual problem, and another that makes .htaccess do the 1.8+ redirects too.