Frage

Ich bin mit Joomla SEF URLs und seinem Arbeits in Ordnung, außer, dass ich brauche ‚HTM‘ Suffix anstelle von ‚.html‘, bitte helfen Sie.

zur Zeit meine URLs erscheinen wie:

www.mysite.com/my-page.html

Ich mag es wie

sein
www.mysite.com/my-page.htm
War es hilfreich?

Lösung

Sie wollen eine der 3rd Party Search Engine Friendly Link Erweiterungen verwenden: http : //extensions.joomla.org/extensions/site-management/sef

Andere Tipps

Hier ist ein Patch. Getestet auf meinem Joomla 1.5.9 (Standard gebündelt 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');
                }
            }
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top