Permalinks don't work (4 posts)

  1. erikcw
    Posted 10 years ago #

    Hi all,

    I imported a bunch of content into WP from my old CMS. Everything works fine when I have permalinks off. However when I turn them on the problems start - basically every permalink gives me a 404.

    Here is the link structure I have setup - I'ved used this on another blog and it works fine - so I don't know what the deal is.


    I have one regular post (non-import), and it seems to work. So perhaps this is something to do with how I did the import (homegrown script). Are there any things I should watch out for? Maybe something wrong with a the slug?

    Here is a sample database entry from the import:
    ID post_author post_date post_date_gmt post_content post_title post_category post_excerpt post_status comment_status ping_status post_password post_name to_ping pinged post_modified post_modified_gmt post_content_filtered post_parent guid menu_order
    Edit Delete 238 1 2005-10-30 16:20:01 2005-10-30 20:20:01 <b>How to Choose a Good Car Tint Shop</b><br>&n... How to Choose a Good Car Tint Shop 0 Most metropolitan areas have an abundance of tint ... publish open open How-to-Choose-a-Good-Car-Tint-Shop 2005-10-29 11:47:43 2005-10-29 15:47:43 0 /?p=1 0

    Any ideas?


  2. Mark (podz)
    Support Maven
    Posted 10 years ago #

    At the very least, the %post_id%.html will kill it off as WP generates files using php not code that produces .html files.
    Are you concerned about losing pages in saech engines ?

  3. erikcw
    Posted 10 years ago #

    Thanks for your response.

    Yea, I am trying to make it as search engine friendly as possible.

    Actually, the %post_id%.html shouldn't make a difference since it is really just an .htaccess regular expression. The server still treats it like a .php (behind the scenes). (I have the same setup working on another WP blog)

    And also it works with the post I made in WP, it just seems to be the posts I imported that are causing trouble. Very strange!

    Any other ideas?

  4. erikcw
    Posted 10 years ago #

    Well I think I found the problem.

    There appears to be a bug in the way WP sets up the rewrite regular expressions in .htaccess.

    "." is considered a special character in regular expressions. I put an escape "\" before the "." and it started working properly!


    Thanks for your help!

Topic Closed

This topic has been closed to new replies.

About this Topic