Topic: url rewriting and search.php

hi, when i use url rewriting (the file based fancy one) the search link is not working

this is with the rewrite: http://neworder.box.sk/forum/search.html
this is the direct link: http://neworder.box.sk/forum/search.php

any ideas what goes wrong?

~Cereal
I've finally learned what "upward compatible" means. It means we get to keep all our old mistakes.
The limits of language are the limits of one's world.

Re: url rewriting and search.php

If I request the search.html page, your forum tries to display some search results. Did you modify the code of your forum? Have you any extensions installed, which can affect the search page?

Re: url rewriting and search.php

hmm,

there are no se% hooks in the db ...

the only thing there is are some url rewrites in a custom extension and it seems that these are creating the troubles
more specific:

$query = array(
                                'SELECT'        => '*',
                                'FROM'          => 'cpages'
                        );
                        $result = $forum_db->query_build($query) or error(__FILE__, __LINE__);
                        while ( $item = $forum_db->fetch_assoc($result) ) {
                                $forum_rewrite_rules['/^'.$item['url'].'$/i'] = 'extensions/'.$ext_info['id'].'/page.php?p='.$item['id'];
                        }

but there are no 'search' urls in the db and certainly no search.html

~Cereal
I've finally learned what "upward compatible" means. It means we get to keep all our old mistakes.
The limits of language are the limits of one's world.

Re: url rewriting and search.php

The value "search.html" is processed by this regex: http://punbb.informer.com/trac/browser/ … es.php#L21

'/^(login|search|register)(\.html?|\/)?$/i'     =>    '$1.php',

Re: url rewriting and search.php

i create a new url rewriting as folowed

$forum_rewrite_rules['/^wallpapers$/i'] = 'extensions/'.$ext_info['id'].'/page.php?p=2';

i don't see how this can influence the one sued for the search ....

~Cereal
I've finally learned what "upward compatible" means. It means we get to keep all our old mistakes.
The limits of language are the limits of one's world.

Re: url rewriting and search.php

But does it really infuence? Works rewriting of search.php fine without the new rule?

Re: url rewriting and search.php

yeah without this rule, the searching works perfect

~Cereal
I've finally learned what "upward compatible" means. It means we get to keep all our old mistakes.
The limits of language are the limits of one's world.

Re: url rewriting and search.php

anyone what has an idea what causes this?

~Cereal
I've finally learned what "upward compatible" means. It means we get to keep all our old mistakes.
The limits of language are the limits of one's world.

Re: url rewriting and search.php

Try to debug the process of selecting rewrite rule in "<FORUM_ROOT>/rewrite.php" (lines 45-76).

10

Re: url rewriting and search.php

i found the problem,

one of my extensions did set the $query variable, serahc.php is checking on isset($query), but is never clearing this var so i added a clear action for it (the last else):

if (isset($_GET['search_id']))
{
....
}
else if (isset($_GET['action']))
{
....
}
else
{
unset($query);
}
~Cereal
I've finally learned what "upward compatible" means. It means we get to keep all our old mistakes.
The limits of language are the limits of one's world.