REDIRECT_HTTP directive
This commit is contained in:
parent
c327056f13
commit
b2bd3303f9
|
@ -119,6 +119,11 @@
|
||||||
// Multi-board (%s is board abbreviation)
|
// Multi-board (%s is board abbreviation)
|
||||||
define('BOARD_PATH', '%s/', true);
|
define('BOARD_PATH', '%s/', true);
|
||||||
|
|
||||||
|
// The HTTP status code to use when redirecting.
|
||||||
|
// Should be 3xx (redirection). http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
|
||||||
|
// "302" is recommended.
|
||||||
|
define('REDIRECT_HTTP', 302, true);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Mod stuff
|
Mod stuff
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -44,6 +44,7 @@
|
||||||
|
|
||||||
function openBoard($uri) {
|
function openBoard($uri) {
|
||||||
global $sql;
|
global $sql;
|
||||||
|
sql_open();
|
||||||
$boards_res = mysql_query(sprintf(
|
$boards_res = mysql_query(sprintf(
|
||||||
"SELECT * FROM `boards` WHERE `uri` = '%s' LIMIT 1",
|
"SELECT * FROM `boards` WHERE `uri` = '%s' LIMIT 1",
|
||||||
mysql_real_escape_string($uri)
|
mysql_real_escape_string($uri)
|
||||||
|
|
2
mod.php
2
mod.php
|
@ -29,7 +29,7 @@
|
||||||
setCookies();
|
setCookies();
|
||||||
|
|
||||||
// Redirect
|
// Redirect
|
||||||
header('Location: ?' . MOD_DEFAULT, true, 302);
|
header('Location: ?' . MOD_DEFAULT, true, REDIRECT_HTTP);
|
||||||
|
|
||||||
// Close connection
|
// Close connection
|
||||||
sql_close();
|
sql_close();
|
||||||
|
|
4
post.php
4
post.php
|
@ -306,9 +306,9 @@
|
||||||
sql_close();
|
sql_close();
|
||||||
|
|
||||||
if(ALWAYS_NOKO || $noko) {
|
if(ALWAYS_NOKO || $noko) {
|
||||||
header('Location: ' . ROOT . $board['dir'] . DIR_RES . ($OP?$id:$post['thread']) . '.html' . (!$OP?'#'.$id:''), true, 302);
|
header('Location: ' . ROOT . $board['dir'] . DIR_RES . ($OP?$id:$post['thread']) . '.html' . (!$OP?'#'.$id:''), true, REDIRECT_HTTP);
|
||||||
} else {
|
} else {
|
||||||
header('Location: ' . ROOT . $board['dir'] . FILE_INDEX, true, 302);
|
header('Location: ' . ROOT . $board['dir'] . FILE_INDEX, true, REDIRECT_HTTP);
|
||||||
}
|
}
|
||||||
|
|
||||||
exit;
|
exit;
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
<?php
|
<?php
|
||||||
header('Location: ../', true, 302);
|
header('Location: ../', true, REDIRECT_HTTP);
|
||||||
?>
|
?>
|
|
@ -1,3 +1,3 @@
|
||||||
<?php
|
<?php
|
||||||
header('Location: ../', true, 302);
|
header('Location: ../', true, REDIRECT_HTTP);
|
||||||
?>
|
?>
|
|
@ -1,3 +1,3 @@
|
||||||
<?php
|
<?php
|
||||||
header('Location: ../', true, 302);
|
header('Location: ../', true, REDIRECT_HTTP);
|
||||||
?>
|
?>
|
Loading…
Reference in New Issue