I'm trying to display posts for categories in my category.php file with pagination, but when I click the "older posts" button, I'm getting a 404. Here's the code I'm currently using for the query:

```
<?php

    // Get ID of category we're currently looking at
    $cat = get_cat_id( single_cat_title("",false) );

    query_posts(array(
        'posts_per_page'=>25,
        'cat' => $cat,
        'paged' => ( get_query_var('paged') ? get_query_var('paged') : 1 )
    ));
    if(have_posts()):
?>

```

The permalink structure I'm using is /%category%/%postname%/

I've read that there is a bug that will leave you with a 404 error if the "posts\_per\_page" is set to less than the default, but that doesn't seem to be the issue. The default in my settings is 20.

Any ideas? Is this an issue with the permalink settings? Shouldn't having /category-name/page/2 work the same way as /blog-page/page/2 works?

I also get a 404 if I try to access categories like this: /category/cat-name, or /blog-page/category/cat-name

Thanks!