JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
use preg instead of ereg
[wfpl.git] / http.php
index 51eb4d3..6c8f916 100644 (file)
--- a/http.php
+++ b/http.php
@@ -78,7 +78,7 @@ function redirect($url, $status = '302 Moved Temporarily', $message = '') {
                if(substr($url, 0, 1) == '/') {
                        $url = this_url_sans_path() . $url;
                } else {
-                       $url = ereg_replace('/[^/]*$', "/$url", this_url());
+                       $url = preg_replace('|/[^/]*$|', "/$url", this_url());
                }
        }