[resolved] Custom Permalinks Generated But Not Redirected (12 posts)

  1. cwd
    Posted 4 years ago #

    In enabled custom permalinks in my Settings area. The string I used was:


    The links generated were, predictably,


    Or some such. That's what I would have expected. Now, in my .htaccess, the complete text is:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]

    The problem is that while the URL is as desired, Apache does not seem to be redirecting. I checked and mod_rewrite is installed. What I can see is that a 404 is being issued for the relative pathname. E.g.,


    I'm thinking the .htaccess is not being seen at all by Apache. Is there something that's falling in my blind spot?


  2. esmi
    Forum Moderator
    Posted 4 years ago #

    Have you tried contacting your hosts? There may be a problem on the server.

  3. cwd
    Posted 4 years ago #

    I *am* my host. It's a VPS. Therein lies my problem :)

  4. You mentioned that you used /%year%/%monthnum%/%day%/%postname%/ but the link that's generating is /2010/5/15/freeble/fooble/65/ ? Is that correct? If so, try re-saving your permalink structure because that post ID appears to be sneaking in somehow.

  5. cwd
    Posted 4 years ago #

    Ok, so I did that, and the link that's being generated comes out something like:


    From the custom string:


    So now the post id is not being included in the string. I've resaved the permalink structure using Save Changes on the Permalink Settings page but still see no evidence that the redirection is taking place.

    Weird thing about it is that this works just fine locally. Is there something in the main httpd.conf that could be making Apache not read .htaccess?

    Thanks so much...

  6. Is WordPress automatically editing the .htaccess file after you save?

  7. cwd
    Posted 4 years ago #


  8. Try this (note the trailing slash at the end):


  9. cwd
    Posted 4 years ago #

    I did that and still no success. Either Apache is not rewriting the URL (the likely scenario because the logs show a 404), or there is a problem turning the URL into an actual post. I'm stumped.

  10. Well, everything is setup to the point that it should be working.

    1. mod_rewrite is enabled.
    2. You're using the approved permalink structure tags.
    3. WordPress is editing the .htaccess file.

    Which brings us back to your question, "Is there something in the main httpd.conf that could be making Apache not read .htaccess?"

    Honestly, I can't say. You may be better off asking in an Apache forum or your VPS provider's support forum.

    For now, you can try adding /index.php/ in front of the structure. Ex:


  11. cwd
    Posted 4 years ago #

    Dang! That worked. I guess indexes must not include index.php, although that seems a bit unlikely as all sorts of other stuff would be breaking. Anyhow, this is wonderful. Google will love me, and all good things have happened.

    Thank you very much.

  12. You're welcome!

Topic Closed

This topic has been closed to new replies.

About this Topic