My requirement is to do SEO Friendly URL for an existing site in Wordpress.
Current URL: http://test.com/test/?pid=19971 that is the page "test" is rendering the data from some custom plugin.
My new SEO URL : http://test.com/brand/sub_category/product_name Here, Brand, Sub_category and product_name is fetched from the pid. I am populating the data using the following rewrite rule from functions.php,
add_rewrite_rule(MY_DYNAMICALLY_POPULATED_URL.'$ page-test.php?brand='.$brand_name.'&sub='.$sub_category.'&pname='.$product_name.' [L]', 'top');
In this code, the page-test.php is placed in the root directory and the data is rendered from that file by passing the brand_name, sub_category and productname to fetch the pid. So based on the pid each product page is rendered.
This code is working fine for me, When I save the data automatically the data is written in .htaccess and page is rendering with the new SEO URL.
But when my client needs it to do it by FALLBACK in Apache instead of add_rewrite_rule due to some load balancing issue.
So can anyone help me how to do the same with Fallback resource.