Good day. Such a problem: I found an engine wrapper on the Internet, which initially seemed convenient to me, but when I approached writing new modules, I needed to use get-requests. I give the code:
if ( $_SERVER['REQUEST_URI'] == '/' ) $page = 'home'; else{ $page = substr($_SERVER['REQUEST_URI'], 1); if ( !preg_match('/^[A-z0-9]{3,15}$/', $page) ) not_found(); } $CONNECT = mysqli_connect('localhost', 'root', '', 'test'); if ( !$CONNECT ) echo('MySQL error'); if ( file_exists('all/'.$page.'.php') ) include 'all/'.$page.'.php'; else if ( $_SESSION['id'] and file_exists('auth/'.$page.'.php') ) include 'auth/'.$page.'.php'; else if ( !$_SESSION['id'] and file_exists('guest/'.$page.'.php') ) include 'guest/'.$page.'.php'; else not_found(); This excerpt from the code page index.php, which is responsible for the pars data from the browser line and the subsequent comparison with other conditions that connect the page. When I register a link to an existing page with absolutely any get-request, I am transferred to page 404 (which is understandable, it can be seen by the code), if I register a link to the same page without GET, everything works, except for, respectively, GET requests .
The question is: what should I add to get get requests in the browser line?