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]
</IfModule>

# END WordPress

Redirect 301 /newsletter.php http://www.progettobenesserecompleto.it/iscrizione-newsletter/

Redirect 301 /corsi/corsi-e-seminari.php http://www.progettobenesserecompleto.it/corsi-e-seminari/

....other redirect 301


Other details:

My installation wp directory is:

http://www.progettobenesserecompleto.it/nonabusaredegliunderscore/

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 */
require('./nonabusaredegliunderscore/wp-blog-header.php');


and in the Settings
> General make blog address (URL) points to
http://http://www.progettobenesserecompleto.it/

This is url i get in the next strange page:

http://search.rapidns.net/?FailedURI=http%3A%2F%2Fhttp


Plase help me.

Thanks




Answers (3)

2012-08-15

Bogdan answers:

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

2012-08-15

Michael Caputo answers:

Your settings shouldn't be
http://http://www.progettobenesserecompleto.it/

it should be:

http://www.progettobenesserecompleto.it/


Michael Caputo comments:

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


maryhellen comments:

I did not write this:
http://http://www.progettobenesserecompleto.it/

but this

http://www.progettobenesserecompleto.it/

Still not working

2012-08-15

Martin Pham answers:

Hey Mary,
Please config in the wp-admin >> setting >>> General
WordPress Address (URL): http://www.progettobenesserecompleto.it/nonabusaredegliunderscore
Site Address (URL): http://www.progettobenesserecompleto.it

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> http://www.progettobenesserecompleto.it/nonabusaredegliunderscore
<strong>Site Address (URL):</strong> http://www.progettobenesserecompleto.it

<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