• Hello.
    I use WP 1.2 and everything works fine. Except from one little annoying thing : the Permalinks are somewhat dysfunctional.
    Explanation:
    here is my permalink structure :
    /blog/%year%/%monthnum%/%day%/%post_id%-%postname%
    and here is the piece of code WP gave me to paste in the .htaccess :
    RewriteEngine On
    RewriteBase /
    RewriteRule ^blog/categorie/(.*)/(feed|rdf|rss|rss2|atom)/?$ /wp-feed.php?category_name=$1&feed=$2 [QSA]
    RewriteRule ^blog/categorie/?(.*) /index.php?category_name=$1 [QSA]
    RewriteRule ^blog/author/(.*)/(feed|rdf|rss|rss2|atom)/?$ /wp-feed.php?author_name=$1&feed=$2 [QSA]
    RewriteRule ^blog/author/?(.*) /index.php?author_name=$1 [QSA]
    RewriteRule ^blog/([0-9]{4})?/?([0-9]{1,2})?/?([0-9]{1,2})?/?([0-9]+)?-([_0-9a-z-]+)?([0-9]+)?/?$ /index.php?year=$1&monthnum=$2&day=$3&p=$4&name=$5&page=$6 [QSA]
    RewriteRule ^blog/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([0-9]+)?-([_0-9a-z-]+)?/(feed|rdf|rss|rss2|atom)/?$ /wp-feed.php?year=$1&monthnum=$2&day=$3&p=$4&name=$5&feed=$6 [QSA]
    RewriteRule ^blog/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([0-9]+)?-([_0-9a-z-]+)?/trackback/?$ /wp-trackback.php?year=$1&monthnum=$2&day=$3&p=$4&name=$5 [QSA]
    RewriteRule ^feed/?([_0-9a-z-]+)?/?$ /wp-feed.php?feed=$1 [QSA]
    RewriteRule ^comments/feed/?([_0-9a-z-]+)?/?$ /wp-feed.php?feed=$1&withcomments=1 [QSA]

    So, the feed links are working, the categories permalinks are working, the individual posts arng, you can try
    category : https://octolan.com/blog/categorie/la-guerre-des-zizi
    feed : https://octolan.com/feed/rss2
    and individual post : https://octolan.com/blog/2004/07/25/552-aqua-de-p-r-u-c-c-i
    But the problem is with the archives: when I try to access all my 2004 posts, or all the posts I did in july 2004, or even the posts on the 25 of July, e.g. : https://octolan.com/blog/2004 or https://octolan.com/blog/2004/07 or https://octolan.com/blog/2004/07/25
    i get a 404…
    I guess it has something to do with the server configuration itself, but I don’t know what :-/
    I didn’t found any solutions in the answers already given on the forum, on the wiki and on the FAQ, so if you can give me the solution, i’ll be very very happy =)

Viewing 3 replies - 1 through 3 (of 3 total)
  • Try adding index.php to the begininning of your permalink structure..
    /index.php/blog/%year%/%monthnum%/%day%/%post_id%-%postname%
    Fixed it for me.. hope it helps you.

    One of your rewrite rules is messed up, try
    RewriteRule ^blog/([0-9]{4})?/?([0-9]{1,2})?/?([0-9]{1,2})?/?([0-9]+)?/?([0-9a-z-]+)?/?([0-9]+)?/?$ /index.php?year=$1&monthnum=$2&day=$3&p=$4&name=$5&page=$6 [QSA]
    instead of
    RewriteRule ^blog/([0-9]{4})?/?([0-9]{1,2})?/?([0-9]{1,2})?/?([0-9]+)?-([_0-9a-z-]+)?([0-9]+)?/?$ /index.php?year=$1&monthnum=$2&day=$3&p=$4&name=$5&page=$6 [QSA]

    Thread Starter beleg

    (@beleg)

    thanks a lot for your answers!
    I tried both your solutions, the first didn’t work, but the second one was right =)
    the rewrite rule I used first was generated by WP, maybe something should be done on the rewrite rule generator code ? (if it’s not hard to correct this little bug)
    anyway, thanks again =)

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Yet Another Problem with .htaccess and Permalinks.’ is closed to new replies.