How I Got Clean URLs For My Blog




A simple and effective solution for SEO-friendly URLs that can be used with virtually any web app.


Like many people and organizations, my site has portions that are powered by open source software. An example of that would be the code powering this blog my old blog, from (with permission from Ben, of course).

This code worked, for the most part, but URLs were written like rather than an SEO-friendly

In order to fix this, some NGINX code is needed.

The rewrite code that worked for me is shown below:

location /blog/ {rewrite ^/blog/(.*)$ /blog/index.php?page=$1 last;}

Feel free to use and adapt this in your NGINX configs as you deem necessary.

Also on: