admin管理员组

文章数量:1391991

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 badges
Add a comment  | 

1 Answer 1

Reset to default 0

Any 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');

本文标签: redirectwordpress automatic URL 39page39 parameter rewrite