Support » Fixing WordPress » different permalinks structures

  • Resolved robertbouma



    Is it possible to have two different permalink structures in WordPress?

    Because of an earlier installation there still some hits from visitors and searchengines on (for example):

    while the new structure is:

    It’s a shame to serve the visitors on the first url a 404 while the content still exists on the second url.

    It would be really nice if one of you guys could help me with this. The easiest would be if it could be solved in my WordPress installation itself, but adding some lines to my .htaccess file would also be fine.

Viewing 8 replies - 1 through 8 (of 8 total)
  • No, you cannot have two different permalink structures on the same installation.
    However, a htaccess guru might be able to solve your problem with a permanent (301) redirect rule in your htaccess file.
    Maybe just googling for some tutorials on htaccess and rewrite rules you can also come up with the solution.

    Hmm, to bad… But thanks for the answer! I will fire up Google and start searching. 🙂

    Should it not be automatically redirected in the newer editions of wordpress?

    How do you mean? The second permalink structure does an automated redirection because that’s how I filled in the permalink option in WordPress itself.

    The first structure is how I did it in an earlier version (a couple of serverhosts ago.. 😉 ) and in my stats I see that I still get hits on those links. Those generate a 404 however and that’s a pity.

    .htaccess looks promising though. Now to find the correct RewriteRule line. 🙂

    I don’t think the statement about WP “automatically redirecting” from one permalink structure to another, is true. Sorry. That just doesn’t make sense…

    Hmm, perhaps I wasn’t realy clear, sorry about that. What I meant was that a while ago (a year or something) I hosted my WP installation on a server that did support permalinks (and the use of .htaccess files by the user). I then moved to a hosting provider that didn’t and just a couple of weeks ago I got my own VPS server and now I can use permalinks again.

    The only thing was, I choose a different structure (yes, stupid, I know.. 😉 ) What I meant by ‘automated redirecting’ was the use of permalinks as such. Not switching between the old structure I used and the new structure.

    I guess that ‘automared redirecting’ is not a very good term because technically spoken there is no redirecting but I just coudln’t find a better way to describe it.

    Sorry, I was answering to lingmiester who posted a completely incorrect statement about newer WP versions.

    @robert: I understand your request and as I said earlier it can be done with .htaccess… I just don’t know the code, sorry.

    Well, it took me some digging, but I found the solution!

    You can add the following lines to you .htaccess, just beneath the RewriteBase / line:

    RewriteCond %{REQUEST_URI} ^/archive [NC]
    RewriteRule ^archive/(.*)$ $1 [L,R=301]

    That did the trick. Seems so simple once you have te solution… 😉

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘different permalinks structures’ is closed to new replies.