0

I am using the WordPress and I created one page few months back. Now, I just created new page and wanted to use the existing page URL. But, it doenst works.

Existing Page URL is: www.techno.com/pricing

I renamed the existing page to www.techno.com/pricingOld and used the above URL to new page.

Problem is , when I use the www.puthuvan.com/pricing it redirects to www.puthuvan.com/pricingOld

How to solve this?

Thanks.

Alex
  • 161
  • 9

1 Answers1

0

I think this issue is being caused by wordpress auto completing URLs. They should disable this protocol, people sometimes add pages to sites that they do not necessary want the public to know are there. Even if someone types a url incorrectly, wordpress will modify the url and redirect to what page it think the user wants to go to. This makes it a lot easier for the public to access unlisted pages on wordpress sites.

to prevent this add the below php code to functions.php

//stop wp auto completing url
function remove_redirect_guess_404_permalink( $redirect_url ) {
    if ( is_404() )
        return false;
    return $redirect_url;
}
add_filter( 'redirect_canonical', 'remove_redirect_guess_404_permalink' );
mister_cool_beans
  • 1,441
  • 1
  • 8
  • 19