• I had this problem months ago, but now that I’ve reinstalled WP to try the blog again, I’ve got the same problem. I’ve SCOURED the codex. Tried everything I could find in the threads.

    When I try to use ANY link form other than default, all the links break, including links to pages, full articles, authors, etc. If I go back to default a nd delete the .htaccess file, the links work.

    Help appreciated.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Not to say that you didn’t try this but just to cover the bases did you check to see if you htaccess file is writable by the web server. Also if you’re running your own server what flavor of ‘nix are you using because I had a problem with my server like this also it was the way apache was setup .

    I had exactly the same thing happen to me when I started with WP – permalinks are a very important feature for your website/blog, they are worth a bit of sweat and tears to get working!

    Im running on FreeBSD/Apache and found that I had to put the following in my .htaccess and then make it NOT writable. This has been used on lots of WP installs and works fine for me.

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

    I think the main difference between this and the standard WP .htaccess (from memory) is the line:

    Options +Followsymlinks

    I set the permalink options in WP, then replace the text in the .htaccess file with the above and make the file NOT WRITABLE – if the file is overwritten by WordPress it breaks the site every time! I’m then able to change the WP permalink structure (or update it if a plugin requires) no problem. WP warns that you need to update .htaccess (because it couldn’t write to it) but I don’t and it always works fine for me with many WP installs!

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.remarpro.com Admin

    If you just did this:

    Options +Followsymlinks
    
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    ...

    Then you’d get the same effect and you wouldn’t have to make the file non-writable. WordPress will only overwrite it’s own rules, between the begin and end lines.

    Ahh, good tip and I know it should work like that, but I had trouble with my .htaccess with it left writeable, especially when I had one site with password protection on a directory – it really screwed up then!

    Thread Starter AMSmith

    (@amsmith)

    Thanks so much for the input. I just tried both ways and neither worked. I’ve got .htaccess chmoded to 644. Should it be something else?

    Here is what I have in the file (also tried it with Options… inside the WP code:

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

    I did figure out one thing. The code generated by the Options>Permalinks page does NOT include:

    # BEGIN WordPress
    or
    # END WordPress

    I tried using the code without it first, then added it. Still, no go.

    Does your host have mod_rewrite enabled? It won’t matter what you do to your .htaccess file if your host doesn’t have mod_rewrite enabled for you.

    Thread Starter AMSmith

    (@amsmith)

    I thought it was. :/ We host our own servers but the sysop is out of town. How can I check?

    Thread Starter AMSmith

    (@amsmith)

    I just found this mod_rewrite test:

    https://www.wallpaperama.com/forums/how-to-test-check-if-mod-rewrite-is-enabled-t40.html

    Link one says, “You are not using mod_rewrite.”

    Link two goes to a 404 error page.

    Guess I have to check that tonight.

    Thread Starter AMSmith

    (@amsmith)

    Checked it. mod-rewrite is enabled…and always has been. Any suggestions now?

    Thread Starter AMSmith

    (@amsmith)

    Didn’t ever get the pretty links to work. Finally tried the almost pretty links and that works. Wish I knew why because I prefer not to have the additional “baggage” in the URL.

    .htaccess is writabe. mod_rewrite is enabled.

    Anyone have a clue?

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Changing permalinks causes all links to break’ is closed to new replies.