Ecommerce Shopify WordPress Discussion

.htaccess pagination redirect rule in wordpress site

people! I want to change the url from "https://some-domain.com/.../?product-page=some-page-number" to "https://some-domain.com/.../page/some-page-number" to make every dynamic page static for caching purposes. This is happened only when I use [shordcodes] to show specific product categories and tags in custom made pages. Im change Settings -> Permalinks -> Custom Structure and enter the structure you want to use, theres everything fine. I try a lot of scenarios in functions.php and in .htaccess file, but nothing work for me. Can somebody help? I try a lot of scenarios in functions.php and in .htaccess file, but nothing work for me. Something like: RewriteRule ^/page/(.*)$ ?product-page=$1 [R=301,L] and other variants, but every time nothing happening
function custom_product_permalink_structure($permalink, $post, $leavename, $sample) { if ($post->post_type == 'product' && is_numeric($post->ID)) { $permalink = home_url("/.../page/{$post->ID}/"); } return $permalink; } add_filter('post_type_link', 'custom_product_permalink_structure', 10, 4); function custom_product_rewrite_rules($rules) { $new_rules = array(); $new_rules['.../page/([0-9]+)/?$'] = 'index.php?product=$matches[1]'; return $new_rules + $rules; } add_filter('rewrite_rules_array', 'custom_product_rewrite_rules'); Replace .../page/ with your desired URL structure. Please see if this works???

January 12, 2024

TurboCommerce make the better internet purchasing globaly

Turbo Multi-language Translator

Make the better internet purchasing globaly

Turbosify SEO Speed Booster

5.0 (7) Free plan available
Get better conversions by improving store loading speed Installed

Turbo Multi-language Chat - AI Customer service in one hand

TurboCommerce make the better internet purchasing globaly
Our products

The help you need, when you need it

App by Turbo Engine

3 apps • 5.0 average rating

Turbosify Speed Booster

5.0 (7)
Get better conversions by optimizing shopify store Google page speed Installed

Turbosify Translator for Wordpress Woocommerce

5.0 (74) Free Wordpress Woocommerce Plugin
Translate your wordpress website to multiple language within 1 click, no configuration needed, no No technical required

Grow your business here

Whether you want to sell products down the street or around the world, we have all the tools you need.