Jump to content

mod_rewrite for apache 2 on debian sarge (wordpress)


Hi I Am Timbo

Recommended Posts

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: http://hi.i.am.timbo.name/
[/code]

Looks like it isn't rewriting! Can anyone think what I am doing wrong?
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.