Tech - Business Tool, Personal Toys

Lighttpd url.rewrite for latest 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:

[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")
Update: 2019-11-01
comments powered by Disqus