John Siu Blog

Tech - Business Tool, Personal Toys

Lighttpd Rewrite For WordPress Jetpack

The latest WordPress Jetpack (4.3.1) is using <your-site>/wp-json/whatever/ for its api callback to the web server. It is an issue for web server not supporting .htaccess, and Lighttpd is one of them.

I end up with a lot of 404 errors in the access.log like the following one:

1
[12/Oct/2016:17:54:58 -0400] "POST /wp-json/jetpack/v4/module/markdown/active HTTP/1.1" 404

Solution

To solve the issue I start exploring Lighttpd url.rewrite. After some research and a few tries, I finally come up with a working configuration:

1
url.rewrite-if-not-file = ("^/(.*)$" => "/index.php/$1")

John Siu

Update: 2020-08-22
comments powered by Disqus