Hi,
As you have updated the permalinks then add this code in the htaccess of your domain..
# BEGIN WordPress
<IfModule mod_rewrite.c>
ErrorDocument 404 /index.php?error=404
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
[spam link moderated]
Thanks,
Shane G.
Nope, that doesn’t work either. That’s almost exactly what was created for me when I changed the structure. Here’s what was automatically created.
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wordpress/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wordpress/index.php [L]
</IfModule>
# END WordPress
Adding the ErrorDocument line and taking out the “wordpress” references made no change. I still get a 404 error.
/%year%%month%/%postname%.html
this is wrong – should look like this
/%year%/%month%/%postname%.html
I would delete the .htaccess in wordpress root and generate a completely new one with this correct structure
(Note: In my forum post I mistyped and should have typed %monthnum% instead of %month%. My intention was to have something look like …/200905/postname.html rather than /2009/05/postname.html.)
Nonetheless, I tried your suggestion of putting the extra slash in, and that didn’t work either. I made a post titled “test-post” and clicked “view post” after publishing it. I get an error that says
Not Found
The requested URL /wordpress/2009/05/test-post.html was not found on this server.
I even did a fresh install on a separate computer and get the same error. I’ve verified that .htaccess is being made, and that mod-rewrite is enabled. However, no matter what non-default structure I pick, the .htaccess file is always created identically. So .htaccess is the same whether the structure is set to “/%year%/%monthnum%/%day%/%postname%/” or “/%year%/%monthnum%/%postname%/” or “/monkey/pinata/%postname%/”. I don’t understand that. It seems like .htaccess should change depending on the structure chosen. index.php is referenced in .htaccess and its not changing either. If I change back to default structure, .htaccess empties.
Is there some file that might need its permissions altered I should look at? I’m running Ubuntu 8.10, Apache2 and WordPress 2.7.1.
A little more info. I added a custom 404 error document to the .htaccess file and it isn’t loading when I intentionally go to a nonexistent page. So for some reason, it appears .htaccess is being ignored.
Resolved:
The problem was that the httpd.conf file was empty. I edited it with:
<Directory /var/www/wordpress>
Options FollowSymLinks
AllowOverride FileInfo
</Directory>
and the problem was solved.