(05-09-2019, 04:03 AM)pfeerick Wrote: For that link, if you replace
www.pine64.org/?product=rockpro64-pci-e-to-dual-sata-ii-interface-card
with
store.pine64.org/?product=rockpro64-pci-e-to-dual-sata-ii-interface-card
it will work ... i.e. replace the www at the front with store, and you're good to go...
Might be a challenging one to fix... there was never a clear separation between the product pages and shop - i.e. a /store/ directory, so there's no easy "redirect all /shop/etc traffic to shop.pine.org" rule you can put in place. Unless there is some way to redirect based on the ?product part of the URL, it goes in the "too hard basket", I think.
(05-09-2019, 11:53 AM)markb1 Wrote:(05-09-2019, 04:03 AM)pfeerick Wrote: Unless there is some way to redirect based on the ?product part of the URL, it goes in the "too hard basket", I think.
Of course there is! One way is to put a little script on the page that examines the part of the URL after the question mark, compares it against a list of known products, and redirects to the store.
Code:
if(isset($_GET['product'])) {
$pid = $_GET['product'];
header("Location: //shop.pine64.org/?product=$pid");
}
this will work (tested too), header needs to be on the top of the main index page though, unless you set php full page buffering on