I couldn’t find a good comprehensive solution for this posted anywhere on the net, so I thought I’d share what I learned.

Since setting up this WordPress-based blog, the WebDAV file store for my zotero (a research tool) has been dead. When trying to reach the WebDAV directory, WordPress “intercepted” my request and showed me a WordPress 404 error instead. For the impatient, the workaround is to add two ErrorDocument tags to the WordPress .htaccess file.

Of course, you must also create the error document /misc/myerror.html.

For the curious (and for the googlebots searching for this solution), the problem was that WordPress and WebDAV wouldn’t work together on Dreamhost. WordPress pretty URLs use mod_rewrite, which intercepts visitors to the WebDAV-enabled directory. The mod_rewrite block includes the conditions

that appear to instruct mod_rewrite not to touch existing files or directories. However, they’re not doing their job for some reason. Likely, the issue is caused by the .htaccess file that Dreamhost uses in the WebDAV-enabled directory to enable password-protection. This file (and the entire WebDAV directory) is owned by dhapache, so there’s not much we can do about this file as users. Regardless, it turns out that Dreamhost doesn’t have proper handler set for 401 and 403 errors.Â Thus, adding the following two lines to the root .htaccess file does the trick:

Subscribe

About Cody A. Ray

I’m an inquisitive, tech-savvy, entrepreneurially-spirited dude. Currently, I’m a DevOps engineer at PEAK6, an entrepreneurial investment firm in downtown Chicago. This is my personal blog. Giving true meaning to the origin of the term, my blog is a catalog of my thoughts on various matters, ranging from technology tutorials to social commentary. My goal is to create insightful, […]more →