url rewriting – WordPress pagination broken for page 2,3 with custom permalink. Redirects to baseurl


I have a forum installed with my wiordpress site. My pagination does not work and redirects pages 2,3, or more to baseurl when they are on homepage. Here are the settings

Forum baseurl: https://example.com/forum
Permalink structure: https://example.com/forum/%category%/%postname%/

Question link: https://example.com/forum/question/how-to-do-xyz/  (Works)
Author link: https://example.com/forum/member/johndoe/            (Works)
Category link: https://example.com/forum/qc/business/             (Works)
CategoryPosts page2: https://example.com/forum/qc/business/page/2/(Works)
Tag Posts page2: https://example.com/forum/qa-tag/pakistan/page/2/   (Works) 

HomePage questions Pagination looks like this,

https://example.com/forum/?page=2

and redirects back to

https://example.com/forum

Here is the .htaccess

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /forum/
RewriteRule ^index.php$ - (L)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /forum/index.php (L)
</IfModule>