Hi David, this is another problem I'm sure I introduced myself since your test site doesn't have the same problem.
When using the sorting feature (ie: relevance, highest, lowest etc) on search result pages the links work great and sort the results properly, the url for those links is fine.
When using the sorting feature on brand pages with .htaccess set to TRUE the links are broken. The proper path after "search.php?..." is maintained but the base url reads "www.example.com/brand/brandname/search.php?...". Obviously the /brand/brandname/ shouldn't be there.
The bit of code that is controling this in search.php seems to be this...
$sortHREF = "search.php?q=".urlencode($q)."&page=1&";
if ($minPrice || $maxPrice)
{
$sortHREF .= "minPrice=".$minPrice."&maxPrice=".$maxPrice."&";
}
$sortHREF .= "sort=";
$sortRelevance = ($sort=="relevance"?"<strong>Relevance</strong>":"<a href='".$sortHREF."relevance' rel='nofollow'>Relevance</a>");
if ($config_useInteraction)
{
$sortRating = ", ".($sort=="rating"?"<strong>Rating</strong>":"<a href='".$sortHREF."rating' rel='nofollow'>Rating</a>");
}
else
{
$sortRating = "";
}
$sortPriceAsc = ($sort=="priceAsc"?"<strong>Lowest Prices</strong>":"<a href='".$sortHREF."priceAsc' rel='nofollow'>Lowest Prices</a>");
$sortPriceDesc = ($sort=="priceDesc"?"<strong>Highest Prices</strong>":"<a href='".$sortHREF."priceDesc' rel='nofollow'>Highest Prices</a>");
Any idea how I can remove the extra /brand/brandname/ from the sort links on brand pages ?
Thanks
Hi,
If you add $config_baseHREF to the first line of the block of code you posted, giving you:
$sortHREF = $config_baseHREF."search.php?q=".urlencode($q)."&page=1&";
...that should do the trick!
Cheers,
David.