[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
R: [mv] Error 404 searching slash
>>
>>In minivend error.log the are no errors! It seems like a bug of Apache.
>
> Bug, no. That really doesn't look like a valid URL. Check your
>Apache log, MiniVend is working fine. Is that a space between cerca and
>categoria? Is your category name really 'GIALLO/THRILLER'? Because
>non-alphanumeric characters are Really Bad in field names.
>
I have found the solution (I hope).
The URL is valid (there are no spaces, the slash is URL-encoded, the
underscore is a valid character in URLs). Really is an Apache bug (or a
feature). It doesn't pass URL-encoded slashes in the PATH_INFO, and mark the
URL as invalid. This for security reasons (to avoid extra path infos in cgi
url like ../../..).
So, how to search categories with slash in them ? My solution is to encode
the slash as %2f in the search string prior to pass it to the [page scan]
tag. This tag, in turn, re-encode the string e produce the URL. Apache
receive the URL, decode and pass it to minivend.
So if I have an user tag [encslash argument], the syntax is:
[page href=scan arg="
mp=cerca_categoria
se=[encslash [item-field categoria]]"][item-field
categoria][/page]
the resulting URL is:
http://shop.videopark.it/cgi-bin/videopark/scan/mp=cerca_categoria/se=GIALLO
%252FTHRILLER?q573RqH5;;58
and the PATH_INFO:
/scan/mp=cerca_categoria/se=GIALLO%2FTHRILLER
I don't know if all this is correct or not, but in any case it seems to
work, producing the list of all products with category GIALLO/THRILLER
Bye
Alessandro Scudieri - Pangea.it
www.pangea.it