Skip to content

Commit

Permalink
5574 added 301 header to redirects
Browse files Browse the repository at this point in the history
  • Loading branch information
Greg committed Mar 15, 2015
1 parent af519cf commit 31fb3d7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions bounce.php
Expand Up @@ -326,7 +326,7 @@ function get_groups($course_id) {
if ($_config['pretty_url'])
{
if (!strpos($dest, '/p_course/')) $dest .= '/p_course/'.$course;
header('Location: '.$dest);
header('Location: '.$dest , TRUE, 301);
exit;
}
} else if (!$_SESSION['valid_user']) {
Expand Down Expand Up @@ -387,7 +387,7 @@ function get_groups($course_id) {

$_SESSION['groups'] = get_groups($course);

header('Location: '.$dest);
header('Location: '.$dest, TRUE, 301);
exit;

break;
Expand Down
6 changes: 3 additions & 3 deletions include/vitals.inc.php
Expand Up @@ -14,7 +14,7 @@
if (!defined('AT_INCLUDE_PATH')) { exit; }
include_once(AT_INCLUDE_PATH . 'lib/vital_funcs.inc.php');

define('AT_DEVEL', 0);
//define('AT_DEVEL', 0);
define('AT_ERROR_REPORTING', E_ERROR | E_WARNING | E_PARSE); // default is E_ALL ^ E_NOTICE, use E_ALL or E_ALL + E_STRICT for developing
//define('AT_ERROR_REPORTING', E_ALL + E_STRICT); // default is E_ALL ^ E_NOTICE, use E_ALL or E_ALL + E_STRICT for developing

Expand Down Expand Up @@ -357,9 +357,9 @@
(isset($_pretty_url_course_id) && !isset($_SESSION['course_id']) && !isset($_REQUEST['ib']))) {

if($_config['pretty_url'] == 0){
header('Location: '.AT_BASE_HREF.'bounce.php?course='.$_pretty_url_course_id.SEP.'pu='.$_SERVER['PATH_INFO'].urlencode('?'.$_SERVER['QUERY_STRING']));
header('Location: '.AT_BASE_HREF.'bounce.php?course='.$_pretty_url_course_id.SEP.'pu='.$_SERVER['PATH_INFO'].urlencode('?'.$_SERVER['QUERY_STRING']), TRUE, 301);
} else {
header('Location: '.AT_BASE_HREF.'bounce.php?course='.$_pretty_url_course_id.SEP.'pu='.$_SERVER['PATH_INFO']);
header('Location: '.AT_BASE_HREF.'bounce.php?course='.$_pretty_url_course_id.SEP.'pu='.$_SERVER['PATH_INFO'], TRUE, 301);
}
exit;
}
Expand Down

0 comments on commit 31fb3d7

Please sign in to comment.