The Most Active and Friendliest
Affiliate Marketing Community Online!

“AdsEmpire”/  Direct Affiliate

Redirect 301

Finlay

New Member
affiliate
Hi guys
I must insert in a html site a htaccess file that create a redirect 301 to
the site home page for every page that gives error 404 (Page not found), but
without affecting the single redirect 301 already present in the file
htaccess regarding other subpage moved and renamed in the past.

The purpose of all of this is not losing the google page rank that can be
passed trough every bad written back link .

What do I write in the htaccess file to do this? Do I have to write it
before or after the existing rules?

Usually I have only one or two error 404 for months to redirect: I wouldn't have to have a penalty for duplicate pages, isn't it?

Thank you
 
The format for redirecting pages is (Redirect code old-page.html new-page.html) Example follows:

Code:
Redirect 301 /old-page.html http://www.brugbart.com/newpage.html
The above redirects the "old-page.html" from a root relative point, you can also use absolute paths.

I would say that you should focus your efforts elseware, giving a 301 redirect instead of 404 on your broken links is a bad idea, the errors are in place for a reason, and they could potientially end up confusing your visitors.

You can however create some custom error pages, which can be used to help your visitors. Example:
Code:
ErrorDocument 404 /404.html

If you need to know the pages which generates 404, then check your server-log files, or the Google Webmaster Tools.
 
banners
Back