ok, now your code shows the exact same simptoms as my original code.
the page works fine without mod_rewrite. infact the exact same flash file and menu work perfectly on the pages without mod_rewrite, so it must have something to do with it.
about the request_uri:
i echoed it and it had the value "/Company/" ,
so inserted the following code:
- Code: Select all
$_SERVER['REQUEST_URI'] = substr($_SERVER['PHP_SELF'],1 );
if (isset($_SERVER['QUERY_STRING'])) { $_SERVER['REQUEST_URI'].='?'.$_SERVER['QUERY_STRING']; }
this changed the value of request_uri to "index.php?option=com_content&view=article&id=2&Itemid=2"
i thought that was a really smart move but unfortunately the problem remains... any other ideas?
cheers, alessa
edit: ok, it seems that i just misplaced the above code. now i put it in a different place, and the menu works perfectly now! in case anyone else ever stumbles over this problem:
put the above code in the very beginning of the index.php in the joomla root directory, not in the template one (obviously
).
the flash file was still messed up, so i tested my path-theory. i created a folder called /Company and put the flash and xml file in it, and now it works as well!!! i will rewrite my flashfile to look for the absolute path on the server.
all problems solved i guess!!!
thanks a million richardk. great help! sometimes it just needs a second mind to find the problem..
edit nr2:
unfortunately i was a little quick on cheering. what happened was that when i was on the mod_rewritten page the "home"-link in the menu suddenly pointed to
www.example.comindex.php/no idea how that happened XD
for now i chose the following solution:
i added some code in /modules/mod_mainmenu/helper.php right where the main menu ul is generated:
- Code: Select all
...
// Print a link if it exists
if ($tmp->url != null)
{
// Handle SSL links
$iSecure = $iParams->def('secure', 0);
if ($tmp->home == 1) {
$tmp->url = JURI::base();
} elseif (strcasecmp(substr($tmp->url, 0, 4), 'http') && (strpos($tmp->link, 'index.php?') !== false)) {
$tmp->url = JRoute::_($tmp->url, true, $iSecure);
} else {
$tmp->url = str_replace('&', '&', $tmp->url);
}
// added code starts here! ---------------------
if ($tmp->url=="http://www.example.comindex.php/") { $tmp->url="http://www.example.com/"; }
// added code ends here! ---------------------
switch ($tmp->browserNav)
{
default:
case 0:
// _top
$data = '<a href="'.$tmp->url.'">'.$image.$tmp->name.'</a>';
break;
case 1:
// _blank
$data = '<a href="'.$tmp->url.'" target="_blank">'.$image.$tmp->name.'</a>';
break;
case 2:
// window.open
$attribs = 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,'.$this->_params->get('window_open');
// hrm...this is a bit dickey
$link = str_replace('index.php', 'index2.php', $tmp->url);
$data = '<a href="'.$link.'" onclick="window.open(this.href,\'targetWindow\',\''.$attribs.'\');return false;">'.$image.$tmp->name.'</a>';
break;
}
} else
...
the commented part is the added code. its a very bad solution, it will probably be overwritten when joomla is updated, but for now it works fine.
i'll post a better solution once i find one...
cheers, alessa