Support » Fixing WordPress » Permalinks break categories

  • Apache 2.2.3-7
    When I try to set permalinks to anything but the default, all links to categories and posts are broken. I checked the contents of .htaccess and they are as suggested by the module:

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

    Here is my Directory section from httpd.conf:

    Alias /blog /var/www/html/wordpress
    <Directory “/var/www/html/blog”>
    Options FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all

    Mod_rewite is enabled. Any help much appreciated.

Viewing 6 replies - 1 through 6 (of 6 total)
  • chmod your .htaccess file 644 while your blog is setup with the default permalinks.. then change the permalink in your admin panel (what are you changing it too?) and see what happens..

    Are you using WP-Cache? Disable it.

    What do you mean they are broken? Do the links change on your blog from say to ? Do you get a 404 Not Found? What does your error.log say?

    [Mon Jul 09 09:18:43 2007] [error] [client] File does not exist: /var/www/html/wordpress/category, referer:

    When clicking on a category after trying a prettier option, I get 404 for all. Looks like Apache is looking for a “category” file under the blog root, which obviously does not exist. I have checked that mod_rewrite is loaded in my conf.

    Tons of troubleshooting tips at the Permalinks page in the codex to look over.

    mod_rewrite is necessary, as you’ve noticed. Without AllowOverride enabled, however, it does nothing.

    Yes, mod_rewrite is enabled, and I have read the docs without finding anything that’s wrong in my setup. I have tried with .htaccess and by placing the directives directly in httpd.conf under the <Directory>, which would rule out permissions problems. Any suggestions?

    Fixed… it was my error. Look at the directory section above…

    <Directory “/var/www/html/blog”>

    should have been

    <Directory “/var/www/html/wordpress”>

    with the effect that none of the directives were being applied, even though I could access it because the alias was correct.

    Glad you got it sorted out — and thanks for following up with your solution. 🙂

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Permalinks break categories’ is closed to new replies.