Not to say that you didn’t try this but just to cover the bases did you check to see if you htaccess file is writable by the web server. Also if you’re running your own server what flavor of ‘nix are you using because I had a problem with my server like this also it was the way apache was setup .
I had exactly the same thing happen to me when I started with WP – permalinks are a very important feature for your website/blog, they are worth a bit of sweat and tears to get working!
Im running on FreeBSD/Apache and found that I had to put the following in my .htaccess and then make it NOT writable. This has been used on lots of WP installs and works fine for me.
# BEGIN WordPress
<IfModule mod_rewrite.c>
Options +Followsymlinks
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
I think the main difference between this and the standard WP .htaccess (from memory) is the line:
Options +Followsymlinks
I set the permalink options in WP, then replace the text in the .htaccess file with the above and make the file NOT WRITABLE – if the file is overwritten by WordPress it breaks the site every time! I’m then able to change the WP permalink structure (or update it if a plugin requires) no problem. WP warns that you need to update .htaccess (because it couldn’t write to it) but I don’t and it always works fine for me with many WP installs!
If you just did this:
Options +Followsymlinks
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
...
Then you’d get the same effect and you wouldn’t have to make the file non-writable. WordPress will only overwrite it’s own rules, between the begin and end lines.
Ahh, good tip and I know it should work like that, but I had trouble with my .htaccess with it left writeable, especially when I had one site with password protection on a directory – it really screwed up then!
Thanks so much for the input. I just tried both ways and neither worked. I’ve got .htaccess chmoded to 644. Should it be something else?
Here is what I have in the file (also tried it with Options… inside the WP code:
Options +Followsymlinks
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
I did figure out one thing. The code generated by the Options>Permalinks page does NOT include:
# BEGIN WordPress
or
# END WordPress
I tried using the code without it first, then added it. Still, no go.
Does your host have mod_rewrite enabled? It won’t matter what you do to your .htaccess file if your host doesn’t have mod_rewrite enabled for you.
I thought it was. :/ We host our own servers but the sysop is out of town. How can I check?
I just found this mod_rewrite test:
http://www.wallpaperama.com/forums/how-to-test-check-if-mod-rewrite-is-enabled-t40.html
Link one says, “You are not using mod_rewrite.”
Link two goes to a 404 error page.
Guess I have to check that tonight.
Checked it. mod-rewrite is enabled…and always has been. Any suggestions now?
Didn’t ever get the pretty links to work. Finally tried the almost pretty links and that works. Wish I knew why because I prefer not to have the additional “baggage” in the URL.
.htaccess is writabe. mod_rewrite is enabled.
Anyone have a clue?