Browse Source

Report de r16625 et r16636

spip-3-stable
Cerdic 12 years ago
parent
commit
4cfafa9f61
  1. 8
      ecrire/action/redirect.php
  2. 2
      htaccess.txt

8
ecrire/action/redirect.php

@ -23,10 +23,14 @@ function action_redirect_dist()
$m = 'var_mode='.urlencode($m);
}
$h = generer_url_entite_absolue(intval(_request('id')), $type, $m, '', true);
$status = '302';
if (_request('status') AND _request('status')=='301')
$status = '301';
if ($h)
redirige_par_entete(str_replace('&', '&', $h));
redirige_par_entete(str_replace('&', '&', $h),'',$status);
else
redirige_par_entete('/');
redirige_par_entete('/','',$status);
}
?>

2
htaccess.txt

@ -85,7 +85,7 @@ RewriteRule ^spip_rss\.php3?$ spip.php?page=rss [QSA,L]
###
# ping http://site/1234 => article1234
RewriteRule ^([1-9][0-9]*)$ spip.php?action=redirect&type=article&id=$1 [QSA,L]
RewriteRule ^([1-9][0-9]*)$ spip.php?action=redirect&type=article&status=301&id=$1 [QSA,L]
#
###

Loading…
Cancel
Save