$main_content .= '<center><h3>Now you are logged. Redirecting...</h3></center>';
if($redirect == 'guilds')
header("Location: ?subtopic=guilds");
elseif($redirect == 'guild')
header("Location: ?subtopic=guilds&action=show&guild=".$guild);
else
$main_content .= 'Wrong address to redirect!';
}
Options -Indexes
ErrorDocument 403 /index.php?subtopic=error&id=403
ErrorDocument 404 /index.php?subtopic=error&id=404
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
$load_id = 0;
$show_types = array('normal', 'text', 'download');
$show_type = 'normal';
$params = explode('/', trim(parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH), '/'));
if(isset($params[0]))
{
$load_id = (int) $params[0];
if(isset($params[1]))
{
if(in_array($params[1], $show_types))
{
$show_type = $params[1];
}
else
{
header('Location: http://paste.ots.me/' . $load_id);
}
}
}