Redirect pages to fix crawl errors

Posted by sarah on Pro Webmasters See other posts from Pro Webmasters or by sarah
Published on 2013-03-16T06:26:18Z Indexed on 2013/11/11 16:17 UTC
Read the original article Hit count: 255

Google is giving me a crawl error for pages that I have removed like www.mysite.com/mypage.html. I want to redirect this pages to the new page www.mysite.com/mysite/mypage. I tried to do that by using .htaccess but instead of fixing the problem, the crawl pages increased and a new crawl came www.mysite.com/www.mysite.com.

This is my .htaccess file:

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

Should I add this after the rewrite rule or I should do something else?

RewriteRule ^pagename\.html$ http://www.sitename.com/pagename [R=301]

© Pro Webmasters or respective owner

Related posts about htaccess

Related posts about 301-redirect