Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Redirect 301 via .htaccess does not work WordPress

Hi, code to redirect old file to new wodrpress site does not work, this is the code in the .htaccess located in root directory:

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

# END WordPress

Redirect 301 /newsletter.php

Redirect 301 /corsi/corsi-e-seminari.php

....other redirect 301

Other details:

My installation wp directory is:

What I'have done_

moved index.php and .htaccess file of this folder in the root directory
edit index,php in this way:
/** Loads the WordPress Environment and Template */

and in the Settings
> General make blog address (URL) points to

This is url i get in the next strange page:

Plase help me.


Answers (3)


Bogdan answers:

You tried to put the code ABOVE (in top)? In the first line I mean.


Michael Caputo answers:

Your settings shouldn't be

it should be:

Michael Caputo comments:

Also, the two redirects you mentioned above seem to be working fine for me.

maryhellen comments:

I did not write this:

but this

Still not working


Martin Pham answers:

Hey Mary,
Please config in the wp-admin >> setting >>> General
WordPress Address (URL):
Site Address (URL):

Your 301 redirect working is fine

maryhellen comments:

I did it but still not working

Martin Pham comments:

please re-save Permalink after update site URL and remove .htaccess file in <strong>nonabusaredegliunderscore</strong> folder

maryhellen comments:

Sorry , i didi not understand , i have to delete or move?

Martin Pham comments:

<strong>1:</strong> Update site adress in Setting >>> General
<strong>WordPress Address (URL):</strong>
<strong>Site Address (URL):</strong>

<strong>2:</strong> Re-save Permalinks on Setting >>> Permalinks

WP will automatically set the htaccess file into the ROOT folder [base Site Address (URL)]

<strong>3: </strong>
Remove htaccess file in the <strong>nonabusaredegliunderscore</strong> folder if it exists


maryhellen comments:

it does not work, may be I did something wrong:

before follow your instructions I have to delete .htaccess in the root directory (this file contains all the redirect 301 from ol static site to wordpress site?

Martin Pham comments:

no, you just delete htaccess file in the folder <strong>nonabusaredegliunderscore</strong> (Wordpess installation directory) if it exists.

Wordpess will update or create a new htaccess file in the root directory when you Re-save Permalinks AND You will not lose another code in the htaccess file.

maryhellen comments:

I've followed your instructions then in the folder nonabusaredegliunderscore there in no more .htaccess.
But i still getting error (i've attached screenhot)

Thanks for your patience.
I 've to resove as soon as possible to avoid google duplicate penalization-

maryhellen comments:

Oops... i've forgot attachment