JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
work around REDIRECT_URL in apache 2.4.17
authorJason Woofenden <jason@jasonwoof.com>
Thu, 29 Oct 2015 16:09:22 +0000 (12:09 -0400)
committerJason Woofenden <jason@jasonwoof.com>
Thu, 29 Oct 2015 16:10:04 +0000 (12:10 -0400)
main.php

index dc1199b..6e05009 100644 (file)
--- a/main.php
+++ b/main.php
@@ -49,6 +49,7 @@ function wfpl_main($dest = false) {
 
        } else { # no dest arg
                $basename = $_SERVER['REDIRECT_URL'];
+               $basename = preg_replace('|[?].*|', '', $basename); # apache 2.4.17
                $basename = preg_replace('|.*/|', '', $basename);
                $basename = preg_replace('|\.html?$|', '', $basename);
                if($basename == '') {