How do I get unwanted page arguments to go away? For example if I have a page called node/244 the page will appear. If I add a random argument on the end for example, node/244/eboibaobabob it will also load...this is very BAD!!! It is totally screwing up my google seo. How do I make it so random arguments will return page not found instead?

Comments

njguy’s picture

Seriously nobody knows how to disable trailing arguments?

field4000’s picture

This may be a silly question, but have you checked your view to see if there is an argument in place? If there is, delete it.

njguy’s picture

This isn't about views this is about every page on drupal. I can go to any node and add some extra url arguments and it will still load. Your site might do it too. I want to know how to stop it.

njguy’s picture

I found a crappy solution that half works if you type this in the theme template file under theme_preprocess_page()

if(arg(0) == 'node' && is_numeric(arg(1))){
		if(arg(2) != ''){
			if(arg(2) != 'edit' || arg(2) != 'track' || arg(2) != 'devel')
				return true;
			else	
				return drupal_not_found();
		}
	}

Drupal has to have a better way...