Question

J'utilise les URL Joomla Sef et leur fonctionnement fonctionne correctement, sauf que j'ai besoin du suffixe ".htm" au lieu de ".html", merci de vous aider.

actuellement, mes URL apparaissent comme suit:

www.mysite.com/my-page.html

Je veux que ce soit comme

www.mysite.com/my-page.htm
Était-ce utile?

La solution

Vous souhaiterez utiliser l'une des extensions de lien Friendly Search Engine tierces: http : //extensions.joomla.org/extensions/site-management/sef

Autres conseils

Voici un patch. Testé sur mon Joomla 1.5.9 (SEF intégré 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');
                }
            }
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top