Rewrite Rules are Redirecting

Question

Trying to get a custom rewrite going for a page.
Page Slug: /near-me/
Create Redirect: /near-me/STATE/city/
Even after flushing the permalinks.

//* Add Rewrite Rule
add_action('init', 'sym_nearme_rewrite_rule', 10, 0);
function sym_nearme_rewrite_rule() {
    add_rewrite_rule('^near-me/([^/]*)/([^/]*)/?','index.php?page_id=4331&region=$matches[1]&city=$matches[2]','top');
}
0
, J.S.T. Andrews 10 months 0 Answers 96 views 0

Leave an answer