PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

Update V4 (PHP) -> V5 (CGI), Mod Rewrite

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Update V4 (PHP) -> V5 (CGI), Mod Rewrite

    Hello!

    I have recently updated from V4 to V5 and from PHP to cgi. There is a single problem, that I need to fix. I would like to rewrite (htaccess) the following search queries:

    domain.org/search/search.php?zoom_query=keyword1+keyword2
    domain.org/search/search.php?zoom_sort=0&zoom_query=keyword1+keyword 2&zoom_and=1
    domain.org/search/search.php?zoom_sort=0&zoom_cat=2&zoom_query=keywo rd1+keyword2&zoom_and=1
    (Currently, it seems that these three also work with "search.gci?..."

    So I would like to have these URLs still working, but the results of the cgi should be displayed. There are two questions that need to be answered:
    First, is there a specific problem with non-working parameters?
    Second, if there is a faster htaccess rule for this, could someone please post it:
    RewriteRule ^search/search.php\?(.*)$ http://www.domain.org/search/search.cgi?$1
    I need these fixes, because I have distributed search plugins for firefox with an update cycle of 1 week (and more)...
    Last edited by Rem; Apr-04-2007, 10:53 AM.

  • #2
    The paramerters used by the CGI are for the most part the same as the PHP script.

    As another solution, you could also just wrap the CGI in PHP and avoid doing the re-write. For example in PHP on Apache,

    <?php
    $QSTRING = $_SERVER['QUERY_STRING'];
    virtual("/cgi-bin/search.cgi".'?'.$QSTRING);
    ?>

    Otherwise I am not an expert on Apache MOD_REWRITE effencicy and you might be better off posting the question in an Apache developers forum.

    Comment


    • #3
      I have to thank you for the idea with PHP!

      I will check the options!

      Comment

      Working...
      X