我正在使用Joomla Sef网址并且工作正常,但我需要'.htm'后缀而不是'.html',请帮忙。

目前我的网址显示为:

www.mysite.com/my-page.html

我希望它像

www.mysite.com/my-page.htm
有帮助吗?

解决方案

您需要使用第三方搜索引擎友好链接扩展名之一: http ://extensions.joomla.org/extensions/site-management/sef

其他提示

这是一个补丁。在我的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');
                }
            }
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top