http://localhost:3000/checkout/7a0b4...-85e900dcc6f8/
Yukaridaki 1.linki 2. link'e donusturmek istedim.
header('Location: /checkout?quote=' . urlencode($quote_id));
exit();yukaridaki kodu asagidaki kodla degistirdim.header('Location: /checkout/' . urlencode($quote_id));
exit;Daha sonra function.php dosyasina asagidaki kodu ekledim.function add_custom_rewrite_rule() {
add_rewrite_rule(
'^checkout/([0-9]+)/?$',
'index.php?pagename=checkout"e=$matches[1]',
'top'
);
}
add_action('init', 'add_custom_rewrite_rule');
function add_custom_query_var($vars) {
$vars[] = 'quote';
return $vars;
}
add_filter('query_vars', 'add_custom_query_var');Simdi bunlarin hepsini yaptim. daha sonra yaptigim herseyi eski haline getirdim ama simdi soru isaretinin hemen oncesine ' / ' ekliyor. neden ? kodu eksi haline getirdim.http://localhost:3004/checkout/?quote=7a0b4b70-5924-11ef-b5a3-85e900dcc6f8boyle gostermesi lazim:
http://localhost:3004/checkout?quote=7a0b4b70-5924-11ef-b5a3-85e900dcc6f8