Browse Source

REDIRECT_HTTP directive

pull/40/head
Savetheinternet 12 years ago
parent
commit
b2bd3303f9
  1. 5
      inc/config.php
  2. 1
      inc/functions.php
  3. 2
      mod.php
  4. 4
      post.php
  5. 2
      res/index.php
  6. 2
      src/index.php
  7. 2
      thumb/index.php

5
inc/config.php

@ -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
*/

1
inc/functions.php

@ -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

@ -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

@ -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;

2
res/index.php

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

2
src/index.php

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

2
thumb/index.php

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