I freshly installed WordPress and checked for multipage post, which is separated by <!--nextpage-->
.
I'm expecting first URL should be:
example.com/wordpress/this-is-test/1/
example.com/wordpress/this-is-test/2/
and so on...
But when I use example.com/wordpress/this-is-test/1/
, it automatically redirect to example.com/wordpress/this-is-test/
.
How can I keep the /1/
at the end?
canonical_redirect
filter. Then there are some adjustments needed via the filters ofwp_link_pages()
.canonical_redirect
url using:add_filter( 'redirect_canonical', array( $this, 'filter_canonical' ), 19, 2 );
try to get and printredirect_url
from args andexit()
but it redirected withoutexit()