• I am transferring a website from another host to our own hosting provider and have run into a strange problem, there is a custom plugin coming over which works correctly on the live website but when it is moved to the new hosting on a temporary url the jobs miss off the / at the end or the url which means the jobs (except for the first one on the list) are not loading. I think the problem is with the rewrite rule:

    public function pb_cla_add_rewrite_rules() {
    $job_page = get_page_by_title( 'Job' );
    add_rewrite_rule( 'jobs/(.+)/?$' , 'index.php?page_id='.$job_page->ID.'&job=$matches[1]' , 'top' );}

    Is there a better way to write the rule to fix the problem?

    • This topic was modified 5 years, 8 months ago by rmsgreig.
    • This topic was modified 5 years, 8 months ago by bcworkz. Reason: code fixed

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘add_rewrite_rule returning wrong url’ is closed to new replies.