Domanda

Sto usando gli URL Joomla Sef e funziona bene, tranne per il fatto che ho bisogno del suffisso '.htm' invece di '.html', per favore aiutate.

attualmente i miei URL appaiono come:

www.mysite.com/my-page.html

Voglio che sia come

www.mysite.com/my-page.htm
È stato utile?

Soluzione

Ti consigliamo di utilizzare una delle estensioni di link compatibili con i motori di ricerca di terze parti: http : //extensions.joomla.org/extensions/site-management/sef

Altri suggerimenti

Ecco una patch. Testato su Joomla 1.5.9 (pacchetto standard 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');
                }
            }
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top