Index: core/kernel/application.php =================================================================== --- core/kernel/application.php (revision 13134) +++ core/kernel/application.php (working copy) @@ -1927,6 +1927,15 @@ if (array_key_exists('js_redirect', $params)) { unset($params['js_redirect']); } + + // allows to send custom responce code along with redirect header + if (array_key_exists('response_code', $params)) { + $response_code = (int)$params['response_code']; + unset($params['response_code']); + } + else { + $responce_code = 302; // Found + } if (!array_key_exists('pass', $params)) { $params['pass'] = 'all'; @@ -1967,7 +1976,7 @@ // no output before -> redirect using HTTP header // header('HTTP/1.1 302 Found'); - header("$location"); + header("$location", true, $response_code); } } } Index: core/kernel/utility/http_query.php =================================================================== --- core/kernel/utility/http_query.php (revision 13134) +++ core/kernel/utility/http_query.php (working copy) @@ -253,6 +253,13 @@ $this->Application->VerifyLanguageId(); $this->Application->VerifyThemeId(); } + + // redirect user to the same mod-rewrite page with 301 header + if ($this->Application->RewriteURLs() && !$this->Get('_mod_rw_url_')) { + $url_params = $this->getRedirectParams(); + $url_params['response_code'] = 301; // Moved Permanently + $this->Application->Redirect('', $url_params); + } } function convertFiles()