The first thing is that the actual problematic link is “http://mysite.com/blog/Blog/Index.php?paged=2”. Notice there is 2 “blog” and this is wrong. Since my category page is working, I used it and it generates a link like this “http://mysite.com/blog/index.php?m=200712&paged=2” and this is correct.
To understand why the same function generated an error in one page while having no problems in another, I traced next_posts_link back to function get_pagenum_link. On the second line, the code is:
$request = remove_query_arg( 'paged' );
I echoed this out and found that on my working page, the $request = '\blog\index.php?m=200712&paged=2'
On the problematic page, $request = '\Blog\Index.php?paged=2'
Notice the big difference is that there is a capital letter ‘B’ in “Blog” on the problematic page, and in subsequent lines of code: