wordpress rewrite rules for lighttpd

I recently tried to tidy up my hand crafted rewrite rules for wordpress/lighttpd and after a very quick google I was taken to an article titled “URL rewriting for wordpress and lighttpd“. Clearly, I thought my search was over. However, I couldn’t help but notice that one of my previous ramblings PHP was resulting in a blank page being rendered.

There was nothing in the error log (although I’m still twiddling with php-fpm and lighttpd) but I realised that my post title (and URL) ended with “php”. Here’s the rewrite rule:

But the problem is with:

The single unescaped “.” next to “php” will translate to “any character, followed by php”. What we need is:

But, as fate would have it, I only found this out because one of my post titles ended with the word “php”. Filed under coincidence.

Posted in Development, Linux, web

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">