• I am trying to enable apache2 mod_rewrite for wordpress and am having some troubles. Here is what I have done (I added logging, but it doesn’t work.

    I did a2enmod rewrite

    I added these lines to /etc/apache2/apache2.conf almost at the bottom, right before the sites-enabled wildcard:

    [code]
    RewriteEngine On
    RewriteLog "/var/log/apache2/rewrite_log"
    RewriteLogLevel 9
    [/code]

    I then changed the permalink structure in wordpress to this:

    [code]
    /%year%/%monthnum%/%day%/%postname%/
    [/code]
    I took the code they gave me and put it in a .htaccess file in the same directory as wordpress’ index.php
    [code]
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    [/code]

    Then reloaded the web server:

    [code]
    /etc/init.d/apache2 force-reload
    [/code]

    everything reloaded fine.

    I go to the blog, and the first pages loads fine (because of the directory index). Then I click a link and get a File Not Found error. Here is the log.

    [code]
    [Thu Dec 14 23:11:46 2006] [error] [client 24.116.186.97] File does not exist: /var/www/timbo.name/hi.i.am/2006, referer: https://hi.i.am.timbo.name/
    [/code]

    Looks like it isn’t rewriting! Can anyone think what I am doing wrong?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘mod_rewrite on debian sarge’ is closed to new replies.