Redirect to main view URL when no contextual filters are set I have a view in drupal 7 with no contextual filters at all set.  

Let's say it is a simple list of nodes of the type "item" and that the url is http://example.com/listofitems

I also have pathauto patterns set for the individual nodes. So if an item titled "my item" is created the url would be http://example.com/listofitems/my-item
This is important to know because I don't want to set another view for the path listofitems/%.

Given that no view or URL alias exists for listofitems/foo I expected that this URL would give a 404 error: http://example.com/listofitems/foo

Instead it shows the full view with no errors.  This is confusing and bad for SEO.  If a bot hits http://example.com/listofitems/foo/bar/foo/bar/foo/bar/blahblahblahblah they should get a 404 message.  Or better yet, they could get a 301 redirect to the main view url.  In any case, they should not be allowed to stay on the non-existant URL and see the view with no errors.

How can I accomplish this?  Is there a trick I'm missing or a reason that this is the default behavior?
The problem lies in Drupal's menu system, which for the most part asserts itself as a safety mechanism, so if you or someone else mis-spells a URL it will give you the next best option.

Admin Menu Example

admin/structure/blocks = Manage Blocks Page

admin/structure/blockss = Structure Page

Drupal does this so it won't "disrupt" the user-experience, but it can also be a confusing if you don't know what just happened. 

It's generally there to prevent human error and other problems that arise when managing a live website.

The Options


Keep the default set, so users are accommodated and instead focus on structuring the robots.txt (and perhaps .htaccess) file correctly, so you can let Search Engines know what's happening.
Look into the Rules and Context contributed modules to see if you can create a solution using those interfaces. You may or may not be able to find a solution there, but it might be a good start.
Create a module, which will handle non-existent URL's and correctly reroute them to 404 page.