Welcome to WebmasterWorld Guest from

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

How can I redirect error links to a specific page?

Trying to redirect errors



2:34 pm on Sep 27, 2009 (gmt 0)

5+ Year Member

If someone were to type in something like localhost/WhateverTextHere that's not on my website...How can I redirect that like the below? The examples that I came across are only file to file.

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
Redirect 301 / [localhost...]


3:02 pm on Sep 27, 2009 (gmt 0)

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member

Define the target page as your custom 404 error document.

Do not redirect to this target page, as this would confuse search engines -- they would receive a 301 redirect followed by a 200-OK response, and therefore think that the page existed but had moved. And by redirecting *all* non-existent URLs to a single page, you would create "infinite duplicate content" -- not good for your search rankings. (Search our Google forum for "duplicate content" to read previous tales of woe.)

See Apache core, ErrorDocument directive, and read very, very carefully, as a single mistake here could be quite costly to you.



Featured Threads

Hot Threads This Week

Hot Threads This Month