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:
parent
c327056f13
commit
b2bd3303f9
@ -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
|
||||
*/
|
||||
|
@ -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)
|
||||
|
2
mod.php
2
mod.php
@ -29,7 +29,7 @@
|
||||
setCookies();
|
||||
|
||||
// Redirect
|
||||
header('Location: ?' . MOD_DEFAULT, true, 302);
|
||||
header('Location: ?' . MOD_DEFAULT, true, REDIRECT_HTTP);
|
||||
|
||||
// Close connection
|
||||
sql_close();
|
||||
|
4
post.php
4
post.php
@ -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;
|
||||
|
@ -1,3 +1,3 @@
|
||||
<?php
|
||||
header('Location: ../', true, 302);
|
||||
header('Location: ../', true, REDIRECT_HTTP);
|
||||
?>
|
@ -1,3 +1,3 @@
|
||||
<?php
|
||||
header('Location: ../', true, 302);
|
||||
header('Location: ../', true, REDIRECT_HTTP);
|
||||
?>
|
@ -1,3 +1,3 @@
|
||||
<?php
|
||||
header('Location: ../', true, 302);
|
||||
header('Location: ../', true, REDIRECT_HTTP);
|
||||
?>
|
Loading…
Reference in New Issue
Block a user