Menu Content

Support

> Forums, FAQs & Paid Support
Welcome, Guest
Username Password: Remember me

Profile for magro

  • OFFLINE
  • Time Zone: GMT +0:00
  • Local Time: 03:13
  • Posts: 3
  • Profile Views: 1600
  • Location: Unknown
  • Gender: Unknown
  • Birthdate: Unknown

Signature

Posts

Posts

emo
I debugged the problem and it turns out that when internal redirecting a page through mod_rewrite, QUERY_STRING is updated but REQUEST_URI stays like the old url.

To hotfix the problem I changed components/com_sef/joomsef.php:

 
function parse(&$uri)
{
global $mainframe;
 
// test for the backlink plugin to work correctly
if (JPluginHelper::isEnabled('system', 'backlink')) {
$joomlaRequest = $_SERVER['REQUEST_URI'];
$realRequest = $uri->toString(array('path', 'query'));
 
if ($realRequest != $joomlaRequest) {
$uri = new JURI($joomlaRequest);
}
}
 
+ if (!empty($_SERVER['QUERY_STRING']))
+ {
+ $uri->_query .= (!empty($uri->_query) ? '&' : '').$_SERVER['QUERY_STRING'];
+ }
 


Probably the redirect detection should be made prior to this function and in other parts of the code, but this just worked for me. How can I suggest this to enter the mainstream as a mod_rewrite compatibility fix?

Thanks.
joomsef mod_rewrite
Category: JoomSEF 3
emo
Yeah, it's odd... I had already skipped com_mindmapufp on the global configurations...

If I use an external redirect, it works fine. But if I do an internal redirect like I posted, it fails with 404 error because option is changed to com_content.

bug or feature?
joomsef mod_rewrite
Category: JoomSEF 3
emo
I'm using joomla artio SEF component on my server, and I needed to create dynamic SEF urls so I used mod_rewrite and wrote something like:

RewriteCond %{REQUEST_URI} ^/mm/.*?/.*?$
RewriteRule ^mm/(.*?)/(.*?)$ index.php?option=com_mindmapufp&view=mindmapufp&name=$2&id=$1&tmpl=component [L]

This will do an internal redirection from an url like /mm/something/something to index.php?option=com_mindmapufp&view=mindmapufp&name=something&id=something&tmpl=component

After debugging, the GET variable "option" gets changed to "com_content" instead of "com_mindmapufp", so I get a 404 error! If I disable joomsef plugin, it works fine...

Any ideas on how to solve it?

Thanks!
joomsef mod_rewrite
Category: JoomSEF 3
More
User Login Empty