0
我使用Joomla海基会的网址,其工作只是罚款,我需要“的.htm”后缀,而不是“的.html”,请大家帮忙。如何改变的Joomla网址后缀
目前我的网址会出现这样的:
www.mysite.com/my-page.html
我希望它像
www.mysite.com/my-page.htm
我使用Joomla海基会的网址,其工作只是罚款,我需要“的.htm”后缀,而不是“的.html”,请大家帮忙。如何改变的Joomla网址后缀
目前我的网址会出现这样的:
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');
}
}
谢谢,我通过购买sh404SEF解决了我的问题。它适用于我的要求和更多。 – Cruising2hell 2009-09-13 11:07:22