Correct Nginx try_files syntax with query params

With WordPress sites and Nginx servers, you may have used one of the following try_files directives... try_files $uri $uri/ /index.php; try_files $uri $uri/ /index.php?$args; Both are incomplete. With the first method, arguments are not passed. With the second method, question mark is present, even when there are no query parameters. A complete solution is to … Continue reading Correct Nginx try_files syntax with query params

Advertisements

Convert Unix Timestamp to Date Format

Recently, had a look at MySQL slow log to see what's happening in a particular site. MySQL logged the unix timestamps that is good for many reasons. In order to convert this, here's a one-liner... date -d @1382734106 # output - Fri Oct 25 20:48:26 UTC 2013