• Resolved Romanowitsch

    (@romanowitsch)


    Hey there,

    I’m using the “All in one SEO” plugin to get rid of the ugly looking permalinks (example.net/?p=10008).

    But my pagination leads to an Error 404 when I click the 2nd, 3rd, … site. For example:

    my-blog.net/page/2

    is an error-page.

    Strangely enough, this doesn’t happen, when I’m in a category archive. These, too, are paginated but it works properly. The URLs then are e.g.

    my-blog.net/categories/category-title/page/2

    This seems to work exactly as it should.

    My server definitely supports the mod_rewrite module.
    My .htaccess loos like this:

    AddType x-mapp-php5 .php
    AddHandler x-mapp-php5 .php
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress

    On my server’s help page, they wrote, “For URLs like ‘blog.com/user/something’ I should enter in the .htaccess the following code:

    RewriteEngine on
    RewriteCond %{REQUEST_URI} user/(.*)$
    RewriteRule user/(.*)$ /user.php?id=$1

    But I don’t want this user-stuff in it. Can someone tell me, how my .htaccess has to look like?

    Here’s a link to my Blog page: grapholution.net

Viewing 15 replies - 1 through 15 (of 19 total)
  • Thread Starter Romanowitsch

    (@romanowitsch)

    Can anyone help me?

    Thread Starter Romanowitsch

    (@romanowitsch)

    Is there anyone knowing what I should change in my .htaccess?

    You don’t need an SEO plugin to use custom permalinks. See Using_Permalinks.

    Thread Starter Romanowitsch

    (@romanowitsch)

    Hey esmi,

    thanks for the reply. I deactivated my All-in-One SEO Plugin but that didn’t help.

    I also read the instructions you linked to, but it didn’t really help neither. The custom permalinks are indeed being displayed as I want them to, but the site pagination still doesn’t work… ??

    Have you tried:

    – deactivating all plugins to see if this resolves the problem? If this works, re-activate the plugins one by one until you find the problematic plugin(s).

    – switching to the Twenty Ten theme to rule out any theme-specific problems?

    Thread Starter Romanowitsch

    (@romanowitsch)

    I go nuts…

    It’s neither a theme-specific issue, because the permalink-structure

    “grapholution.net/page/2”

    doesn’t work in none of my installed themes, nor does the (theme built-in) pagination work with all plugins deactivated.

    Moderator James Huff

    (@macmanx)

    Do you have a physical /page/ directory?

    If so, /page/2 would be treated as a file in the /page/ directory as opposed to a virtual directory, thus generating the error.

    Thread Starter Romanowitsch

    (@romanowitsch)

    Hey James,

    I read about this possibility in the FAQs, but my directories are the standard WP ones. (wp-admin, wp-content,…). So there’s no physical “page”-directory.

    Any other idea?

    Would it be helpful if I let one of you guys sneak in my backend to have a closer look at the settings? (You see how desperate I am… :/ )

    What permalink structure are you using?

    Pretty URLs appear to work for various archival pages on your site, but others not so …

    I’m inclined to say, enable the default theme, disable plugins and try one of the provided permalink structures, day and name, month and name(whatever)… just use one of the provided structures that isn’t default..

    It sounds like one of two things to me.. (or possibly a combination of two)

    1. A poor permalink structure
    2. Theme template files declaring query parameters and failing to include paging parameters

    When trying to do something similar I have found what appears to be a small glitch – when you use the following argument –

    'posts_per_page' => 5

    – you seem to get the correct number of posts displayed on the page, but the links created for pagination still take their value from the ‘Blog pages show at most’ option found in ‘Settings -> Reading’.

    Using the below instaed fixed this small problem, and while it might not 100% solve your problem it may help you understand better what sort of things could be causing the problem –

    'posts_per_page' => get_option('posts_per_page'),

    Thread Starter Romanowitsch

    (@romanowitsch)

    @mark / t31os

    I took a screenshot of my permalink settings. You can see it here:

    https://yfrog.com/mkbildschirmfoto20101209up

    (It’s the german WP-version though…)

    I don’t really understand your two options. What do you mean by “query” and “paging” parameters?

    @duck_boy:

    I’ve read about this issue, too. The problem is, my WP-theme (“Platform”) is cut in so many PHP-files that I hardly could find this command. It appears in only one PHP-file which defines the theme-settings in the backend. It says:

    'full_column_posts'	=> array(
    						'default' => 2,
    						'type' => 'count_select',
    						'count_number'	=> get_option('posts_per_page' ),
    						'inputlabel' => 'Number of Full Width Posts?',
    						'title' => 'Full Width Posts (Magazine Layout Mode Only)',
    						'shortexp' => 'When using magazine layout mode, select the number of "featured" or full-width posts.',
    						'exp' => 'Select the number of posts you would like shown at the full width of the main content column in magazine layout mode (the rest will be half-width post "clips").'
    					),

    The line: 'count_number' => get_option('posts_per_page' ), is the only one with the posts_per_page command. But I don’t use the “full_column_posts” option for which it is defined…

    Should I add posts_per_page => get_option('posts_per_page') line in a different file? If so, where? (I’m a little confused by all these files in the theme folder…)

    …try one of the provided permalink structures, day and name, month and name(whatever)… just use one of the provided structures that isn’t default..

    Not all URLs will work correctly under certain permalink structures, try one of the default structures and see if the paging works correctly, you’ll at least be able to rule this out if it is not the cause..

    Thread Starter Romanowitsch

    (@romanowitsch)

    …try one of the provided permalink structures, day and name, month and name(whatever)… just use one of the provided structures that isn’t default..

    I tried this. I used the “month and name” structures and the error still appeared. Only if I chose the standard permalink structure (e.g.: domain.net/?p=123) the pagination worked…

    But unfortunetly I don’t know why the paging structure is only working with those ugly standard urls…

    p.s.: I’m sorry for the long time span between your replies and mine. I do my best to keep’em short

    1:50am here, heading off shortly, just a difference of timezone.. ??

    When switching theme, and disabling plugins, it’s important you regenerate the permalink settings when you do so. Both themes and plugins can run the same kind of code, and simple deactivation will not regenerate the rewrite rules.

    Please disable plugins, then visit the permalinks page(this alone will invoke a flush of the rewrite rules), set one of the provided structures and then test one of your pages.

    If that doesn’t help, leave the plugins disabled, switch theme, then again visit the permalink settings page and again try one of your pages.

    This way we can absolutely rule out a problem with both the theme or plugins, whilst knowing for sure the rewrite rules have been regenerated at each step(if you didn’t take these steps before it could make all the difference).

    Thread Starter Romanowitsch

    (@romanowitsch)

    Ok. You were right, I didn’t take these steps before. So now I did exactly what you told me.

    I first deactivated all plugins, set one of the default permalinks (“day and name”), refreshed and tried my page.

    Same problem.

    I kept the plugins switched off and changed the theme to TwentyTen. Set some other default permalinks (“numeric” and after that again “day and name”), refreshed my site each time and tried it out.

    The problem persists.

    Only if I selected the standard permalinks (…/?p=123) the pagination worked.

    By the way:
    I send an e-mail to my domain host in order to get some help from their part, but they simply linked to a general help page that gives an example code for some .htaccess stuff that I definitly don’t need and said they wouldn’t provide any support for third party applications (WordPress)… I think I gotta change the host!

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘Site pagination leads to Error 404’ is closed to new replies.