2009-09-11 68 views
0

我使用Joomla海基会的网址,其工作只是罚款,我需要“的.htm”后缀,而不是“的.html”,请大家帮忙。如何改变的Joomla网址后缀

目前我的网址会出现这样的:

www.mysite.com/my-page.html 

我希望它像

www.mysite.com/my-page.htm 

回答

0

这是一个补丁。测试我的Joomla 1.5.9(标准捆绑SEF):

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'); 
       } 
      }