noindex meta element via PHP on any page with HTTP query?
Posted: Mon Dec 10, 2007 2:13 am
I want my site to play nice with search engines and thus I don't want search engines to recrawl the same pages with HTTP queries. So what would be a nice clean way to determine if the page was loaded with any HTTP query so I can simply echo a meta noindex element?
Here is an attempt that didn't work...
Here is an attempt that didn't work...
Code: Select all
$thisurl = $_SERVER['REQUEST_URI'];
if (preg_match("/?/", $thisurl)) {echo 'HTTP Query detected!';}
else {echo 'no HTTP query detected';}