Rev 1245 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1245 | Rev 1247 | ||
---|---|---|---|
Line 42... | Line 42... | ||
42 | header('Location:'.OIDplus::webpath().'?goto='.urlencode('oidplus:err:'.$_REQUEST['h404'])); |
42 | header('Location:'.OIDplus::webpath().'?goto='.urlencode('oidplus:err:'.$_REQUEST['h404'])); |
43 | die(); |
43 | die(); |
44 | } |
44 | } |
45 | } |
45 | } |
46 | 46 | ||
- | 47 | $static_node_id_original = $static_node_id; |
|
47 | $static_node_id = OIDplus::prefilterQuery($static_node_id, false); |
48 | $static_node_id = OIDplus::prefilterQuery($static_node_id, false); |
48 | - | ||
49 | if (OIDplus::baseConfig()->exists('CANONICAL_SYSTEM_URL')) { |
49 | if ($static_node_id_original !== $static_node_id) { |
50 | // Make sure that "goto" is set correctly in the canonical URL |
50 | // Redirect to the corrected query |
51 | $url = []; |
- | |
52 | parse_str($_SERVER['QUERY_STRING'], $url); |
51 | $canonical_url = OIDplus::canonicalURL($static_node_id); |
53 | if (isset($url['goto'])) { |
52 | if ($canonical_url) { |
54 | if ($url['goto'] != $static_node_id) { |
- | |
55 | $url['goto'] = $static_node_id; |
53 | header('Location:'.$canonical_url); |
56 | $_SERVER['QUERY_STRING'] = http_build_query($url); |
- | |
57 | } |
54 | die(); |
58 | } |
55 | } |
59 | unset($url); |
56 | unset($canonical_url); |
60 | } |
57 | } |
- | 58 | unset($static_node_id_original); |
|
61 | 59 | ||
62 | $static = OIDplus::gui()->generateContentPage($static_node_id); |
60 | $static = OIDplus::gui()->generateContentPage($static_node_id); |
63 | $page_title_2 = $static['title']; |
61 | $page_title_2 = $static['title']; |
64 | $static_icon = $static['icon']; |
62 | $static_icon = $static['icon']; |
65 | $static_content = $static['text']; |
63 | $static_content = $static['text']; |