Title: 404 Not Found? Turn 404 Error Page into Profit! Post by: Daniel Franklin on September 26, 2007, 02:54:09 PM So why lost this traffic? With two-three simple lines of code you can redirect 404 traffic to a sponsor and make money automatically: sample redirects: with .htaccess : 404notfoundredirect .htaccess sample #1 #404notfoundredirect ErrorDocument 404 http://www.yoursponsor.com/?youraffiliateidhere with .htaccess Apache's mod-rewrite: 404notfoundredirect .htaccess with Apache's mod-rewrite sample #3 If http://www.examplesite.com/url/file.html does not exist, redirect to http://www.examplesite.com/index.php Put this in your site .htaccess file: RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*) http://www.yoursponsor.com/?youraffiliateidhere all wrong hits will be redirected to your site http://www.yoursponsor.com/?youraffiliateidhere with javascript (put this page instead of moved/deleted page on your site) 404notfoundredirect Search Engine-Friendly JavaScript Redirect with Frames - sample #4 <html> <head> <title> Go To Sponsor </title> <script> location.replace("http://www.yoursponsor.com/?youraffiliateidhere") </script> </head> <frameset cols="0,*"> </frameset> <noframes> <body> Please Visit my site sponsor </body> </noframes> </html> redirect with php: 404notfoundredirect Redirects with PHP - sample #5 <?php header("Location: http://www.yoursponsor.com/?youraffiliateidhere"); ?> More useful information about .htaccess, redirects, deny/allow you can find at http://www.404notfoundredirect.com/ Articles Source - Free Articles |