RevCMS? Go to class.html.php, and then where it says if($file != null) add an else statement where it gets the index page like the rest of the code gets a page.
I'm on mobile rn so cant really describe it any further.
Sent from my SM-G928F using Tapatalk
<?php
namespace Revolution;
if(!defined('IN_INDEX')) { die('Sorry, you cannot access this file.'); }
class html implements iHTML
{
private $html;
final public function get($file)
{
global $template, $_CONFIG;
if($file != null && ctype_alnum($file))
{
if(file_exists('app/tpl/skins/'.$_CONFIG['template']['style'].'/' . $file . '.php'))
{
ob_start();
include('app/tpl/skins/'.$_CONFIG['template']['style'].'/' . $file . '.php');
$this->html .= ob_get_contents();
ob_end_clean();
$this->setHTML();
}
else
{
$this->get('404');
}
}
else
{
header('Location: '.$_CONFIG['hotel']['url'].'/index');
exit;
}
}
final public function getHK($file)
{
global $template, $_CONFIG;
if($file != null)
{
if(file_exists('../app/tpl/skins/'.$_CONFIG['template']['style'].'/hk/' . $file . '.php'))
{
ob_start();
require_once('../app/tpl/skins/'.$_CONFIG['template']['style'].'/hk/' . $file . '.php');
$this->html .= ob_get_contents();
ob_end_clean();
$this->setHTML();
}
else
{
$this->getHK('404');
}
}
else
{
$this->getHK('dash');
}
}
final public function setHTML()
{
global $template;
$template->tpl .= $this->html;
unset($this->html);
}
}
?>
Just way easier solution to add an else statement if the file is null lol.Or you can just go to global.php and do the following
$_GET["url"] = (isset($_GET["url"]) && !empty($_GET["url"])) ? $_GET["url"] : "index";
or add empty string to switch case
Just way easier solution to add an else statement if the file is null lol.
Sent from my SM-G928F using Tapatalk
Its still easier. Read instead of just arguing about something you obviously never bothered to read properly.Not at all, requires him to understand how revcms handles the request, which he obviously doesn't know as if he did then this wouldn't of been posted..