Welcome Guest, Not a member yet? Register   Sign In
Is it possible to intercept external garbage URLs to a search routine instead of 404 page?
#1

[eluser]John_Betong_002[/eluser]
 
Google Webmaster Tools is complaining of numerous links returning with "An Error Was Encountered [400]".

Edit - start:

Just noticed that my original post was truncatedSad

What I would like to do is to somehow trap the URL before it fails the routing tests, etc.

I would like to use the following code:
Code:
$bad_chars = array('width','height','=',':','<','>','alt','//', 'etc');

  $good_words  = str_replace($bad_chars, '/', $_SERVER['REDIRECT_URL']); // REQUEST_URL

  header('Location: /my_search_routine/' . $good_words);
  exit;

Edit - end:


The following is an example which results in application/errors/error_general.php

&nbsp;
http://website.com/afiles/images/santa-email.jpg" width="100" height="50" alt="image"/></a> </div> <div class="c0 r"><a


Messages In This Thread
Is it possible to intercept external garbage URLs to a search routine instead of 404 page? - by El Forum - 04-10-2011, 11:00 PM



Theme © iAndrew 2016 - Forum software by © MyBB