Zymic Forums

Webmaster resources

Zymic IRC Server

Chat in real time at irc.zymic.com - Learn More

Welcome

Welcome to the Zymic webmaster forums. Our forums are here to provide people the free ability to discuss a range of websites related topics such as design, development coding and marketing.

In order to post you will need to register for a zymic account or if you already have one simply login by using the form on the left.

left Zymic Webmaster ForumsWeb Design & DevelopmentServer Side ScriptingOther Languages right
  Reply to this topic Start new topic
left right
Zaccaria
post Feb 2 2009, 10:22 PM
Post #1


Newbie
*

Group: Members
Posts: 4
Joined: 2-February 09
Member No.: 80,347



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

__________________
You have never see gifts ideas like these? (idee regali on italian cultura generale)
Go to the top of the page 
 
  + Quote Post
PHP_Adam
post Feb 2 2009, 11:44 PM
Post #2


Newbie
*

Group: Members
Posts: 6
Joined: 2-February 09
Member No.: 80,346



You shouldn't get any penalties for duplicate pages, as they are not. Their just redirects.

Add this before or after your mod_rewrite or other redirects:
CODE
ErrorDocument 404 /index.php


Id recommend changing it though to
CODE
ErrorDocument 404 /index.php?404=1

That way you can also log your 404 errors, whilst they are redirected to your homepage.

Happy To Help,
PHP_Adam
Go to the top of the page 
 
  + Quote Post
Zaccaria
post Feb 3 2009, 10:57 AM
Post #3


Newbie
*

Group: Members
Posts: 4
Joined: 2-February 09
Member No.: 80,347



QUOTE(PHP_Adam @ Feb 2 2009, 11:44 PM) *
Id recommend changing it though to
CODE
ErrorDocument 404 /index.php?404=1

That way you can also log your 404 errors, whilst they are redirected to your homepage.


what it does so, excuse?
thanks
Go to the top of the page 
 
  + Quote Post
johnythomas
post Feb 11 2012, 12:27 PM
Post #4


Newbie
*

Group: Members
Posts: 24
Joined: 22-December 11
Member No.: 223,089



This is a wonderful opinion. The things mentioned are unanimous and needs to be appreciated by everyone.
Go to the top of the page 
 
  + Quote Post
 Reply to this topic Start new topic
left right
0 Members:
left right
 


Lo-Fi Version Time is now: 19th May 2013 - 10:59 AM