2

Through Google webmaster tools i noticed many crawl errors. However none of the url's exists anymore but are still linked somewhere in other pages. If i surf to such url i get "Invalid GET Data" An example of such url is: http://www.mysite.com/normal?destination=catalogus%3Fpage%3D60 http://www.mystie.com/normal?destination=catalogus%3Fpage%3D26%26cat%3Dhom%25E2%258A%2582%253D1%26pag%3D1%26afb%3D1

Is there a way i can redirect such url's automaticly via htaccess or should i remove this manually which they are a lot...

2
  • were these old urls that used to exist on the site before you installed EE? Jan 23, 2013 at 23:07
  • Yes, but now discovered from the many sites that link to it.
    – Visual
    Jan 24, 2013 at 15:48

1 Answer 1

1

Here's a fix from the Bug Report which should eliminate the error:


Open system/expressionengine/core/EE_Input.php

Find this code on line 110:

if (preg_match("#(;|\?|exec\s*\(|system\s*\(|passthru\s*\(|cmd\s*\(|[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})#i", $val)) 

And REPLACE it with this:

if (preg_match("#(;|exec\s*\(|system\s*\(|passthru\s*\(|cmd\s*\()#i", $val))  

A couple options for redirecting:

  1. After you've made the change above, you should be able to create a template group called "normal" and add whatever you want into that template. Can you a specific message or can be redirect code to the 404 error page with {redirect="404"}

  2. You can handle this in your .htaccess file by redirecting any URL with "normal" to the index page or any page with something like the following:

...

RewriteEngine On  
RewriteCond %{REQUEST_URI} normal  
RewriteRule .* index.php

Disclaimer: The above rewrite code is untested. mod_rewrite docs are here if you need to fine-tune the code.

4
  • I probably wouldn't recommend doing that unless you actually need to use that GET data though, because it might open up security issues in EE. Better to just ignore the errors if they aren't causing anyone any harm. Jan 24, 2013 at 6:42
  • Hi Anna_mediagirl this did the trick for the current error "Invalid Get Data", But I seem to have more than just this error depended on the "url" For example: This: page.com/meubels?page=75&%24Version=1&%24Path=%2F returns "Disallowed Key Characters." Another url error is the following: page.com/brands/brand%3Fpage=1?page=1 returns "The URI you submitted has disallowed characters." Not sure i should make a new Question for this or leave it here Any help? Thanks in advance.
    – Visual
    Jan 24, 2013 at 15:47
  • I'd ask a new question for this new error. Also, so a search on this site. It may have been addressed already.
    – Anna_MediaGirl
    Jan 24, 2013 at 16:07
  • thanks i did a search i couldn't find anything that helped.
    – Visual
    Jan 30, 2013 at 9:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.