Skip to content

Instantly share code, notes, and snippets.

@falkirks
Last active May 5, 2016 11:59
Show Gist options
  • Save falkirks/d39007b4769fdbba19d0 to your computer and use it in GitHub Desktop.
Save falkirks/d39007b4769fdbba19d0 to your computer and use it in GitHub Desktop.
PocketMine-Banners router
RewriteEngine on
RewriteCond %{REQUEST_URI} !=/index.php
RewriteRule !^assets($|/) index.php [L,QSA]
<?php
require_once 'vendor/autoload.php';
define("MAIN_PATH", realpath(__DIR__));
$path = strtok(isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : $_SERVER['PATH_INFO'], '?');
$path = explode("/", ltrim($path, "/"));
$main = array_shift($path);
switch($main){
case 'generate':
//REDACTED
break;
//REDACTED
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment