[resolved] htaccess file points every link to index.php (4 posts)

  1. onocrotalus
    Posted 10 years ago #


    I'm trying to implement permalinks on my site (click on name link, left).

    WP is able to generate an htaccess file for me, but every permalink then just points to index.php.

    The structure I want is: /%year%/%monthnum%/%day%/%postname%/

    The link appears correctly in this format in the address bar when I click on a post title. Instead of loading the post, though, the index page just reloads.

    The htaccess file looks like this:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]

    # END WordPress

    It looks a bit fishy, but I don't know nearly enough about it to set about writing it myself.

    This same file is generated whatever structure I specify in the admin panel - so I assume there's some problem with generating the htaccess file code.

    I have tried removing the write access to the htaccess file using CHMOD, to see if WP generates different code for me to paste in - but it doesn't.

    Any ideas would be gratefully received!

  2. Chris_K
    Posted 10 years ago #

    With 2.0, WP doesn't generate all that much for .htaccess. Just the bare minimum, as it were. The rest is done programmatically by WP. As such, what you provided above looks typical.

    To get the pretty permalinks going you may want to have a look at the trouble-shooting/fixing sections here: http://codex.wordpress.org/Using_Permalinks

    In particular, confirm that your host has mod-rewrite enabled -AND- AllowOverride turned on for you.

  3. Christopher J. Hradil
    Posted 10 years ago #

  4. onocrotalus
    Posted 9 years ago #

    This plugin solved the problem. Perhaps worth including a short note about it in the Permalinks Codex? It certainly took me a while to hunt it down.

Topic Closed

This topic has been closed to new replies.

About this Topic