Better redirection to have canonical URLs.

dev
Loic d'Anterroches 2009-02-16 22:18:09 +01:00
parent 37f94d8581
commit d1b139bb30
1 changed files with 4 additions and 0 deletions

View File

@ -159,6 +159,10 @@ class IDF_Views_Source
$branches[0]));
if (substr($request_file, -1) == '/') {
$request_file = substr($request_file, 0, -1);
$url = Pluf_HTTP_URL_urlForView('IDF_Views_Source::tree',
array($match[1], $match[2],
$request_file));
return new Pluf_HTTP_Response_Redirect($url, 301);
}
if ('commit' != $scm->testHash($commit, $request_file)) {
// Redirect to the first branch