commit be062efe6d0dfb2908f9b1d6c58ae6548e892c14
parent 60a6952a495650a77d717d5cd7e5c30bb0025e0c
Author: markseu <mark2011@mayberg.se>
Date: Tue, 15 Dec 2015 00:22:49 +0100
System update (winter remix)
Diffstat:
1 file changed, 7 insertions(+), 0 deletions(-)
diff --git a/system/plugins/core.php b/system/plugins/core.php
@@ -601,6 +601,7 @@ class YellowPage
{
$this->error(500, "Parser '".$this->get("parser")."' does not exist!");
}
+ if($this->yellow->toolbox->isRequestSelf()) $this->error(500, "Rewrite module not enabled on this server!");
if($this->yellow->getRequestHandler()=="core" && $this->isExisting("redirect") && $this->statusCode==200)
{
$location = $this->yellow->lookup->normaliseLocation($this->get("redirect"), $this->base, $this->location);
@@ -2391,6 +2392,12 @@ class YellowToolbox
return preg_match("/^(.*\/)?$pagination:.*$/", $location);
}
+ // Check if script location is requested
+ function isRequestSelf()
+ {
+ return $_SERVER["REQUEST_URI"] == $_SERVER["SCRIPT_NAME"];
+ }
+
// Check if clean URL is requested
function isRequestCleanUrl($location)
{