2009-09-11 9 views
0

J'utilise Joomla Sef URLs et son fonctionnement bien sauf que j'ai besoin de suffixe '.htm' au lieu de '.html', s'il vous plaît aider.Comment changer joomla suffixe url

actuellement mes URL apparaissent comme:

www.mysite.com/my-page.html 

Je veux que ce soit comme

www.mysite.com/my-page.htm 

Répondre

0

Voici un patch. Testé sur mon Joomla 1.5.9 (SEF fourni standard):

Index: includes/router.php 
=================================================================== 
--- includes/router.php (revision 13023) 
+++ includes/router.php (working copy) 
@@ -57,8 +57,13 @@ 
      { 
       if($suffix = pathinfo($path, PATHINFO_EXTENSION)) 
       { 
-     $path = str_replace('.'.$suffix, '', $path); 
-     $vars['format'] = $suffix; 
+     if ($suffix == 'htm') { 
+      $path = str_replace('.'.$suffix, '', $path); 
+      $vars['format'] = 'html'; 
+     } else { 
+      $path = str_replace('.'.$suffix, '', $path); 
+      $vars['format'] = $suffix; 
+     } 
       } 
      } 
     } 
@@ -93,7 +98,8 @@ 
      { 
       if($format = $uri->getVar('format', 'html')) 
       { 
-     $route .= '.'.$format; 
+     //$route .= '.'.$format; 
+     $route .= '.htm'; 
        $uri->delVar('format'); 
       } 
      }