Support » Fixing WordPress » Mixing Permalinks with regular Redirects

  • Hello,

    I have wordpress up and running, and I’ve got a nice little permalink structure that I have set up through the options. The htaccess file was edited correctly and the permalinks all work.

    My problem is that I want to add some additional redirects so that old pages redirect to newer blog posts. I’m not looking to do a rewrite rule or anything, just a simple RedirectPermanent directive. Any time I add the redirect to the htaccess though, I wind up getting Error 500. I think there is some kind of conflict with the wordpress modifications to the htaccess file.

    Does anyone have an example of an htaccess file where Redirects and the wordpress rewrite rules live in harmony?

    WordPress is installed to the root of my html folder, which might be complicating things.


Viewing 6 replies - 1 through 6 (of 6 total)
  • the root folder is no problem, you may want to check the apache site for the correct .htaccess syntax. it sounds like it is a simple error such as that your redirect rules are in the wrong place, etc.

    air0day, I have the same issue. I tried several different syntaxes to set up an individual redirect, but I’m getting the 500 error. I tried these that I found in tutorials:

    • Redirect permanent /oldpage/ /newpage/
    • redirectpermanent /oldpage/ /newpage/

    I’m going to try to read up on apache directives to figure this out, will post back if I do.


    I don’t think the problem is my htaccess format. Here is my file:

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

    Redirect /one.html /two.html

    If the redirect isn’t there, everything works (except obviously one.html doesn’t redirect anywhere) but adding that line results in Error 500 when I try to access the site at all.


    So I’ve discovered that you and I are both idiots. For a redirect, the second thing apparently needs to be a full URL.


    Redirect permanent /one.html

    Yep found that out as well, but I opted for RewriteRule in the end so I could make use of conditionals.

    Also, you should put your redirects at the top of the .htaccess file, before all the WordPress rules. This speeds processing.

    You can do the same with Rewrites as well. Just be certain that when you do a redirect via a rewrite, that your rule has an [R,L] or [R=301,L] or whatever. The L being the important bit.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Mixing Permalinks with regular Redirects’ is closed to new replies.