Short URLs with &search on the end - not working
Posted: Fri Nov 27, 2015 8:17 am
I have a neat little video page for a client, as they have hundreds on their web site, attached to products. Customers like searching for them.
So now they can scan thru the categories, but also search for a product and up comes all the results.
The first result in date order (newest first) shows as a video at the top, with the rest of them below it, as tiled DIVs.
When they search and the results come up, the url is a full url.
But when they click the product to view from the result, it changes to:
/videos/product/55/160/&search=shirt&searchvideo=y
The "searchvideo=y" is what commands the results below to look for results of the search, rather than results of the catid (55).
But if they click that link, the cat id is used (as it highlights that products category on the left menu), and the product's video plays, but none of the following variables are picked up.
So the search it then belows for the products, is based on the Catid, not the search variable.
I'm using this in this order in HTACCESS:
Have tried it the other way around too.
Also tried [L].
Nothing seems to work.
So now they can scan thru the categories, but also search for a product and up comes all the results.
The first result in date order (newest first) shows as a video at the top, with the rest of them below it, as tiled DIVs.
When they search and the results come up, the url is a full url.
But when they click the product to view from the result, it changes to:
/videos/product/55/160/&search=shirt&searchvideo=y
The "searchvideo=y" is what commands the results below to look for results of the search, rather than results of the catid (55).
But if they click that link, the cat id is used (as it highlights that products category on the left menu), and the product's video plays, but none of the following variables are picked up.
So the search it then belows for the products, is based on the Catid, not the search variable.
I'm using this in this order in HTACCESS:
Code: Select all
RewriteRule ^videos/product/([0-9]+)/([0-9]+) /index.php?page=videos&catid=$1&id=$2 [QSA]
RewriteRule ^videos/([0-9]+) /index.php?page=videos&catid=$1 [QSA]Also tried [L].
Nothing seems to work.