1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-11-24 07:30:10 +01:00

REDIRECT_HTTP directive

This commit is contained in:
Savetheinternet 2010-12-02 18:07:24 +11:00
parent c327056f13
commit b2bd3303f9
7 changed files with 12 additions and 6 deletions

View File

@ -119,6 +119,11 @@
// Multi-board (%s is board abbreviation)
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
*/

View File

@ -44,6 +44,7 @@
function openBoard($uri) {
global $sql;
sql_open();
$boards_res = mysql_query(sprintf(
"SELECT * FROM `boards` WHERE `uri` = '%s' LIMIT 1",
mysql_real_escape_string($uri)

View File

@ -29,7 +29,7 @@
setCookies();
// Redirect
header('Location: ?' . MOD_DEFAULT, true, 302);
header('Location: ?' . MOD_DEFAULT, true, REDIRECT_HTTP);
// Close connection
sql_close();

View File

@ -306,9 +306,9 @@
sql_close();
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 {
header('Location: ' . ROOT . $board['dir'] . FILE_INDEX, true, 302);
header('Location: ' . ROOT . $board['dir'] . FILE_INDEX, true, REDIRECT_HTTP);
}
exit;

View File

@ -1,3 +1,3 @@
<?php
header('Location: ../', true, 302);
header('Location: ../', true, REDIRECT_HTTP);
?>

View File

@ -1,3 +1,3 @@
<?php
header('Location: ../', true, 302);
header('Location: ../', true, REDIRECT_HTTP);
?>

View File

@ -1,3 +1,3 @@
<?php
header('Location: ../', true, 302);
header('Location: ../', true, REDIRECT_HTTP);
?>