I found several problems with managing this. All links on the page CANNOT be
relative (i.e. HREF="filename.php/var/var/var" it must be
HREF="/filename.php/var/var/var" or with the full path. Otherwise your
browser will try to attach the filename to the end of the long querystring
you created.  Unless someone on this list knows of a way around that.

As for a form, say the resulting form of a searchbox. If you want the form
to be a 'GET' form so people can see the querystring I created a file which
made that happen. You POST to the form with a hidden variable in there
containing the actual destination. The code is here:

<?
if (isset($frmaction)) {
    $qsarray = array();
    //build querystring
    while (list($key, $val) = each($HTTP_POST_VARS)) {
        if ($key != "frmaction") {
            if (is_array($val)) {
                while ($v = current($val)) {
                    $qsarray[] = $key . "/" . rawurlencode($v);
                    next($val);
                }
            } else {
                $qsarray[] = $key . "/" . rawurlencode($val);
            }
        }
    }

    $querystring = implode("/", $qsarray);
    header("Location: $frmaction/$querystring");
}

On 10/26/2001 2:37 PM this was written:

> 
>   Search engines don't normally reach anything on a query string (whatever's
> after a ? ).  So, if you're passing variables from one page to another, you
> can use a spider-friendly method by changing your URL from something like
> http://host/script?var1=1&var2=2 to something like http://host/script/1/2.
> Then you can extract the variables through the $PATH_INFO variable.
> 
>   This was discussed a while back when I posted this same question.  Look
> through the archives and search for subject topic "Submitting variables via
> /'s"...
> 
>   You may also want to read the following article:
> 
>   http://www.zend.com/zend/spotlight/searchengine.php

-- 

Thomas Deliduka
IT Manager
     -------------------------
New Eve Media
The Solution To Your Internet Angst
http://www.neweve.com/



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to