WordPress.org

Ready to get started?Download WordPress

Forums

Permalinks break categories (7 posts)

  1. aolong
    Member
    Posted 6 years ago #

    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]
    </IfModule>
    # 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
    </Directory>

    Mod_rewite is enabled. Any help much appreciated.

  2. AskApache
    Member
    Posted 6 years ago #

    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 domain.com/blog/?p=17 to domain.com/blog/2007/break-categories/ ? Do you get a 404 Not Found? What does your error.log say?

  3. aolong
    Member
    Posted 6 years ago #

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

    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.

  4. Chris_K
    Member
    Posted 6 years ago #

    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.

  5. aolong
    Member
    Posted 6 years ago #

    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?

  6. aolong
    Member
    Posted 6 years ago #

    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.

  7. Chris_K
    Member
    Posted 6 years ago #

    Glad you got it sorted out -- and thanks for following up with your solution. :-)

Topic Closed

This topic has been closed to new replies.

About this Topic