Support » Fixing WordPress » LOCATION of 301 redirect code INSIDE htaccess file

  • Hello, I’m remaking an existing site and now it will use WordPress.

    *The old pages were just regular html pages. I have 4 pages that I need to set up 301 Redirects (in htaccess file) for because they will now be .php pages.

    I have found several posts and info on Google about how to do it but I can’t find anyone to tell me EXACTLY ‘where’ in the .htaccess file to put the 301 code! I think you put it before the existing code; SO does this look correct as far as syntax and LOCATION of the 301 in the file itself?

    Does this look correct. I also think I saw somewhere that there CANNOT be any blank likes at the beginning of the file…This is where and how I will make it and then upload it back up to my WordPress site root:

    Redirect 301 /contact.html
    Redirect 301 /about.html
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /wordpressnet/
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /wordpressnet/index.php [L]


    # END WordPress

    Thank anyone ahead of time for helping 😉

  • The topic ‘LOCATION of 301 redirect code INSIDE htaccess file’ is closed to new replies.