WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Please help solving PERMALINK issue! (17 posts)

  1. ralfrottmann
    Member
    Posted 8 years ago #

    Hi there,
    I have been going through almost all permalink related posts across various forums. However I have not been able to resolve my problem nor to nail it down somehow.

    I am running WordPress 2.0. Updating has been a charm. Permalinks for me never worked. Not under 1.5.2 nor under 2.0.

    Here are some steps I have undertaken:

    - I have a .htaccess file.
    - The file can be edited programmatically (permissions). If I add rules maunally via the admin panel's file editor, they are successfully saved end executed.
    - If I add rewrite rules to .htaccess manually, they work. This is a clear sign than mod_rewrite works fine on my server.

    However, if I activate permalinks, nothing is added to the .hatccess file. The links in my blog are updates (so they point to ../archives/1, ../archives/2 etc.) but if I click them they lead to nowhere.

    So basically the main issue seems to be that WordPress does *not* update the .htaccess file and does *not* add any rules to it.

    Can anybody help tracking this down?

    Regards
    Ralf

  2. Austin Matzko
    Member
    Posted 8 years ago #

    1. Have you set the file permissions of .htaccess so that all can write to it? (i.e. something like CHMOD 777)
    2. Under Options > Permalinks in the admin control panel, have you selected something other than "default"?

  3. ralfrottmann
    Member
    Posted 8 years ago #

    Yes. Both.
    The file can be fully accessed. As I have stated in my initial post: WordPress' built-in file editor can successfully edit the .htaccess file. A clear indication that the 777 access rights work fine.

    Non of the settings in Options > Permalinks work.

    Any idea?

  4. Austin Matzko
    Member
    Posted 8 years ago #

    WP 2.0 basically puts the same .htaccess rules for everybody, doing most of the rewrite rules internally. So, if you can edit the .htaccess file with the file editor, just put the standard WP 2.0 stuff in there (adjusting if you have WP in a different directory than the top-level one):
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php
    </IfModule>

    # END WordPress

  5. ralfrottmann
    Member
    Posted 8 years ago #

    Thanks again for helping. Unfortunately it still does not work. My WordPress 2.0 is in the blog subdir. So I changed .htaccess to:

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

    # END WordPress

    However, issue remains. The problem seems to be that WordPress *does not ADD any rules* to the file once I select one of the permalink options. It leaves the .htaccess file untouched. This to me seems to be the root cause.

    Any idea?

  6. Austin Matzko
    Member
    Posted 8 years ago #

    If WP is in the blog sub-directory, then I'm pretty sure it needs to look like this:

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

    (and that's in the .htaccess file in the blog/ directory)

  7. ralfrottmann
    Member
    Posted 8 years ago #

    I am close to giving up and migrating to MovableType. I changed the .htaccess file as you've posted. Issue remains. The key thing is that WordPress 2.0 ***never adds any rewrite rules to .htaccess***. Do you have any idea why? Isn't it supposed to add a list of rewrite rules to .htaccess when I change the permalinks options?

  8. vkaryl
    Member
    Posted 8 years ago #

    WordPress now handles that internally. Your .htaccess will always look like that posted above. That's how it's planned to work.

  9. Austin Matzko
    Member
    Posted 8 years ago #

    Isn't it supposed to add a list of rewrite rules to .htaccess when I change the permalinks options?

    No, for WP 2.0, all that stuff is handled internally. WP 2.0 would not add anything else to the .htaccess file other than what I put above. So, if you have the .htaccess file as above, and you have selected something other than "Default" under Permalinks, your permalinks should go to the right posts. I don't know why they wouldn't.

  10. vkaryl
    Member
    Posted 8 years ago #

    There are various threads on this over the last few days; there appears to be some problems with use of any custom permalink settings (that is, anything other than the default shown on the permalinks page). One assumes that the devs will eventually get it sorted before much longer.

  11. ralfrottmann
    Member
    Posted 8 years ago #

    ... while "default" points to the URL parameter options ?p=xyz right? The URL parameter version is not considered a permalink at all, or?

    Well, seems as if I can only wait. I still wonder why WordPress 2.0 does not inject the above code into my .htaccess file.

  12. Austin Matzko
    Member
    Posted 8 years ago #

    What happens when you check, e.g. "Date and name based" under Options > Permalinks (clicking the Update Permalink Structure button)? Do you see the permalinks for the individual posts? What happens when you click them?

  13. ralfrottmann
    Member
    Posted 8 years ago #

    I do see the permalinks. They seem to be correct. However clicking them I end up on a "This page cannot be found" error.

    As an example for one of the generated links here is the URL:

    http://www.rottmann.net/blog/index.php/2006/01/02/updated-blog-to-version-20/

    So the URLs get updated however once I submit this URL it seems as if there is no redirect. Instead the browser tries to load the physical page at the address which - obviously - is not there.

  14. Austin Matzko
    Member
    Posted 8 years ago #

    Okay, try removing the "index.php" from the permalink structure. In other words, go with something like /%year%/%monthnum%/%day%/%postname%/
    so you get something like
    http://www.rottmann.net/blog/2006/01/02/updated-blog-to-version-20/

  15. ralfrottmann
    Member
    Posted 8 years ago #

    SOLVED IT!

    Now all three options offered by WordPress 2.0 work like a charm!!!

    Thank you so much for your patience. Any idea why the default way offered by WP 2.0 did not work?

    Man, I hope this helps lots of users out there.

  16. vkaryl
    Member
    Posted 8 years ago #

    That IS the default.

  17. Austin Matzko
    Member
    Posted 8 years ago #

    Glad to hear it.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.