Search the blog

If you get the query string when using ProcessWire you will notice it always contains a URL vriable called it. This is used by ProcessWire’s router and the server to create dynamic search engine-friendly URLs.

Use this instead:

					
$input->queryString()					
				

This will filter out it and return an empty string if there is no query string.

Note: if you need to get individual GET vars, you should use $input->get() instead.

Tim Bennett is a web designer and developer. He has a First Class Honours degree in Computing from Leeds Metropolitan University and currently runs his own one-man web design company, Texelate.