Support » How-To and Troubleshooting » The Horrors of Changing Permalink Structure

The Horrors of Changing Permalink Structure

  • I started a blog with the permalink structure:


    …and then after a bunch of posts decided I needed this blog to be:


    …instead. (Old static site still sending traffic to the html versions)

    So I changed the permalink structure, made sure it saved and I deleted my old .htaccess file too.

    I simply can’t fathom what the heck is going on now!

    Get this:

    * When I create or edit a post, it shows the .html in the permalink preview.

    * When I click on any link to any post from any page across the site, it takes me to a 404 page with the .html on the end.

    * But only when I strip the .html off my address bar does it take me to the post.

    –> Posts can only be viewed without the .html, but every part of wordpress says that it needs the .html, both frontside and back.

    This is happening to every post, both the new ones and the old ones, and the new ones were NEVER without the .html. They were made with it and the edit page shows that this still is their permalink.

    W… T.. F…?

    Again, the .htaccess file has been wiped away & remade, so I’m at a loss. Anyone? Please, any guesses at all?

Viewing 15 replies - 1 through 15 (of 15 total)
  • You deleted the old .htaccess file, but created again?? (what a stupid question! but just a rechek)

    Make sure that file is writable before you update the permalinks.

    If this is done, please provide us the .htaccess code, so we can check that..

    After noticing the problem I deleted .htaccess from my server and then went to save the permalink settings again. That generated a new .htaccess file.

    The contents of it are simply:

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

    It seems so strange that wordpress can create a site full of links with .html at the end, yet not a single one of them actually exist.

    Thanks in advance for your help.

    I’ve now read through everything in the codex about Permalinks and what I did should be working perfectly… But doesn’t.

    This problem seems like it will affect everyone who wants .html at the end of their wordpress-generated permalinks. I can’t understand what I’m doing wrong, It’s a new build and All the settings are what they should be.

    Anyone, please?

    I guess the Codex is just Wrong then. Permalinks with a .html on the end don’t work. 🙁

    the codex isnt wrong.

    you do realize that this:


    is wrong???

    this is right:


    Thanks for replying, whooami.

    Yes, /%category%/%post-name%.html would be wrong… I can’t imaging how that typo got made here. :p

    Rest assured, I entered /%category%/%postname%.html into the field from the start, copied and pasted from the codex directly. The post name has always translated into the actual post name without a problem.

    My only problem here is that the .html shows up everywhere but on the actual post…. Links are all made to .html, and even while editing or creating posts, you can see the .html in the permalink preview.

    It just doesn’t exist there with a .html – It only exists without it. (So all the link on my site, correctly pointing to where it should be, are now 404s!)

    Got any better ideas? Thanks again!

    This should be the code.

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

    I am using .msp for my site and it is working fine. Please check your .htaccess file. If this code does not exists there, copy and paste it there (take a backup first)..

    That’s what it generates each time I delete it.

    All rewriting is going well… It just doesn’t rewrite things with a .html on the end.

    So I maintain that /%postname%.html simply doesn’t work, and the Codex is WRONG. An Admin should really change that.

    okay, but I can point to to wordpress blogs where its done 😉

    yes, codex is not wrong and it is working for other blogs. I suggest you to consult your host, why your domain is not obeying .htaccess rules correctly..

    I am also using .html and works fine on many instalations.
    Just to let you know that is possible.

    Host not obeying .htaccess correctly? …I guess I can buy that.

    Since I doubt that the codex’s writers, AlainS and whooami are all wrong about this one, I guess it must be something local to my host.

    Geez… I’ve got a super-standard build on a hostgator shared server, and the .htacess file is exactly like it should be… I can’t imagine where to start asking questions.

    In fact, it seems easier just to use the Redirection plugin at this point, and keep the stupid permalink path ending with /%postname% -It might take a while to set the redirects up from /postname.html to postname, but at least I won’t have to deal with hostgator tech support!

    Thanks for everyone’s help.

    I didnt write the codex 🙂 and youre as much of an author of it as anyone :)) its all user added content, freely editable like any other wiki

    hostgator shouldn’t have any trouble with those permalinks, btw. Im befuddled, to say the most.

    Hi lukep

    Try the same on a local server just to see if it will work with .html.
    If it will work then you’ll at least know that there is something wrong in the online server config.

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘The Horrors of Changing Permalink Structure’ is closed to new replies.