• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Routing with "&key=value parameters

#1
I have a question what might be very basic but I can't find the solution for it..

I have a route set to 
$route['action-name/(.*)'] = 'main/procedure/$1';

it works great, but I've noticed when evaluated my SEO stats that I'm getting 404 errors when google indexes the pages.. The reason seems to be that Google adds certain parameters ad the end of the url, which causes the routing to fail...

404. That’s an error.
The requested URL was not found on this server. That’s all we know.
Code:
/search?q=cache:zDt-ObjwbuEJ:https://website.com/action-name/object-permalink+&cd=22&hl=en&ct=clnk&gl=us


when typed directly into the browser's address bar, I get this:
Fatal error: Class 'CI_Controller' not found in /home/jml/public_html/website.com/system/core/CodeIgniter.php on line 366

How do I get around it? When I remove the part added by Google, it works as supposed to.. Can I somehow just ignore the added parameters? Would I set it in route.php or htaccess?

Please advice, 
Many thanks in advance
Miro
Reply

#2
it looks very wrong Huh
if a site is not found it should be 404 Page Not Found.

have you changed something in the system folder? Codeigniter version?
Reply

#3
thaks for responding..

it's version 3.0.0. haven't changed anything, all files in system folder have identical Last Modified date/time stamp..

I'm clueless... :-(
Reply

#4
I think QUERY_STRING is not problem?

you can parse QUERY_STRING to array

parse_str($_SERVER['QUERY_STRING'], $get);

var_dump($get) to check values
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.