Permalinks rewrite OK, but always give 404 when hit
-
Just moved to WP a few days ago and really like it, but I’m stuck trying to get permalinks to work. My old site used this format:
https://fak3r.com/articles/2006/06/21/sample-post/
And on my webserver I’m still seeing Google and others that are linked to those posts failing, since now all my posts look like:
I want to do a 301 perm redirect, I go into the Permalinks section, and then choose ‘Date and name based’ which spits out the line:
/%year%/%monthnum%/%day%/%postname%/
Then I either leave it like that, or modify that to (I’ve tested it both ways):
/articles/%year%/%monthnum%/%day%/%postname%/
but both ways it fails. My .htaccess file (also I’ve tested w and w/o the top Directory Directive, just include it so that we know it’s on):
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory><IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>But when I hit my site, fak3r.com works, *and* all of the links look rewriten correctly:
https://fak3r.com/2006/06/20/hello-world/
So it is rewriting the URLs, but it gives a File not Found, with Apache’s errorlog showing:
[Wed Jun 21 11:08:20 2006] [error] [client xxx.xxx.xxx.xxx] File does not exist: /usr/local
/www/data-dist/fak3r.com/2006, referer: https://fak3r.com/
[Wed Jun 21 11:08:23 2006] [error] [client xxx.xxx.xxx.xxx] File does not exist: /usr/local
/www/data-dist/fak3r.com/2006, referer: https://fak3r.com/
[Wed Jun 21 11:08:25 2006] [error] [client xxx.xxx.xxx.xxx] File does not exist: /usr/local
/www/data-dist/fak3r.com/2006, referer: https://fak3r.com/So it’s failing to find it, since it can’t find the ‘2006’ directory – which doesn’t exist, but that’s what mod_rewrite is supposed to be taking care of.
I know mod_rewrite works on this server, my last blog was running on a web app so it’s external URL (fak3r.com) would come in on the standard http port 90, and then it needed to be converted with mod_rewrite and mod_proxy to point to an internal webapp running on port 3000. What I’m attempting with WP is much simplier, so I can’t understand why it’s not working. I’ve searched the Docs and Forums to no avail. I’ve even recompiled PHP since I had it running as CLI which someone said caused problems, but no change.
Specs:
FreeBSD: 6.0-SECURITY
APACHE: 2.0.58
MYSQL: 5.1.9
PHP: 5.1.4
WORDPRESS: 2.0.3Thanks
f
- The topic ‘Permalinks rewrite OK, but always give 404 when hit’ is closed to new replies.