diff --git a/README.md b/README.md index 0daa00b..a62808e 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Pico [![License](https://picocms.github.io/badges/pico-license.svg)](https://github.com/picocms/Pico/blob/master/LICENSE.md) [![Version](https://picocms.github.io/badges/pico-version.svg)](https://github.com/picocms/Pico/releases/latest) -[![Build Status](https://api.travis-ci.org/picocms/Pico.svg)](https://travis-ci.org/picocms/Pico) +[![Build Status](https://api.travis-ci.org/picocms/Pico.svg?branch=master)](https://travis-ci.org/picocms/Pico) [![Freenode IRC Webchat](https://picocms.github.io/badges/pico-chat.svg)](https://webchat.freenode.net/?channels=%23picocms) Pico is a stupidly simple, blazing fast, flat file CMS. diff --git a/lib/Pico.php b/lib/Pico.php index e15f1e8..b1e71eb 100644 --- a/lib/Pico.php +++ b/lib/Pico.php @@ -1830,7 +1830,14 @@ class Pico return $urlRewritingEnabled; } - $this->config['rewrite_url'] = (isset($_SERVER['PICO_URL_REWRITING']) && $_SERVER['PICO_URL_REWRITING']); + if (isset($_SERVER['PICO_URL_REWRITING'])) { + $this->config['rewrite_url'] = (bool) $_SERVER['PICO_URL_REWRITING']; + } elseif (isset($_SERVER['REDIRECT_PICO_URL_REWRITING'])) { + $this->config['rewrite_url'] = (bool) $_SERVER['REDIRECT_PICO_URL_REWRITING']; + } else { + $this->config['rewrite_url'] = false; + } + return $this->config['rewrite_url']; }