Contributing to the webpage
#10
(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


Messages In This Thread
Contributing to the webpage - by Luke - 05-08-2019, 10:11 AM
RE: Contributing to the webpage - by markb1 - 05-08-2019, 01:10 PM
RE: Contributing to the webpage - by Luke - 05-08-2019, 01:11 PM
RE: Contributing to the webpage - by markb1 - 05-08-2019, 01:30 PM
RE: Contributing to the webpage - by Luke - 05-08-2019, 02:20 PM
RE: Contributing to the webpage - by markb1 - 05-08-2019, 02:28 PM
RE: Contributing to the webpage - by Luke - 05-08-2019, 02:32 PM
RE: Contributing to the webpage - by pfeerick - 05-09-2019, 04:03 AM
RE: Contributing to the webpage - by markb1 - 05-09-2019, 11:53 AM
RE: Contributing to the webpage - by GRATS - 06-09-2019, 12:00 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)