I have noticed that on my wordpress installation the page
domain/test?page=2
is redirecting to
domain/test/2
I tried disabling all plugins and also used the default/different themes and the behavior exists nevertheless, why I am assuming that this is a wordpress behavior.
Is there any chance to prevent this redirect and keep the ?page parameter intact in the URL?
I have noticed that on my wordpress installation the page
domain/test?page=2
is redirecting to
domain/test/2
I tried disabling all plugins and also used the default/different themes and the behavior exists nevertheless, why I am assuming that this is a wordpress behavior.
Is there any chance to prevent this redirect and keep the ?page parameter intact in the URL?
Share Improve this question asked Mar 26, 2020 at 18:22 TomTom 1114 bronze badges1 Answer
Reset to default 0Any reason why you need to keep the ?page= in the url? If you just need to get the value of the page you can use:
// will return value after "paged" pages "test/page/2" $paged will be 2
$paged = get_query_var('page');