Need help about URL Rewriting - Joomla! Forum - community, help and support
hello !
as says in title, little url rewriting.
here url "non sef" "drive" component: "index.php?option=com_vernitheque&cat=claire&name=vernis-uno&itemid=152".
i've done half job because able rewrite sef url through file "rooter.php" , "jroute :: _ ()", gives url translation : "http://localhost/lafoliedesvernis/vernitheque/claire/vernis-uno.html. "
probleme : when use sef address 404 error,
logical, joomla try "com_content" component instead of "com_vernitheque."
please can put me on right way (what file needed ?, what's methods used joomla decrypt sef url ??...) ?
i put code in file "router.php"
for information, make var_dump of "$vars", , result good, refind "$_get" variable send before sef translation, except "itemid" (maybe cause of problem ??).
thank in advance , week everyone!
mickael
as says in title, little url rewriting.
here url "non sef" "drive" component: "index.php?option=com_vernitheque&cat=claire&name=vernis-uno&itemid=152".
i've done half job because able rewrite sef url through file "rooter.php" , "jroute :: _ ()", gives url translation : "http://localhost/lafoliedesvernis/vernitheque/claire/vernis-uno.html. "
probleme : when use sef address 404 error,
logical, joomla try "com_content" component instead of "com_vernitheque."
please can put me on right way (what file needed ?, what's methods used joomla decrypt sef url ??...) ?
i put code in file "router.php"
code: select all
<?php
function vernithequebuildroute(&$query) {
$segments = array();
if(isset($query['name'])) {
$segments[0] = $query['cat'];
$segments[1] = $query['name'];
unset($query['cat']);
unset($query['name']);
}
return $segments;
}
function vernithequeparseroute($segments) {
$vars = array();
// différentes choses essayées pour éviter l'erreur 404
$vars['option'] = 'com_vernitheque';
$vars['view'] = 'vernitheque';
$vars['cat'] = $segments[0];
$vars['name'] = $segments[1];
return $vars;
}
?>
for information, make var_dump of "$vars", , result good, refind "$_get" variable send before sef translation, except "itemid" (maybe cause of problem ??).
thank in advance , week everyone!
mickael
Comments
Post a Comment