problem about view module in drupal 7 I have created a view for a content type called "events," and in the view there are 2 contextual filters (by category and years).

what I want to do is to be able to view the result in 3 conditions:


only the year:  http://example.com/events/2010  
only the category ID:  http://example.com/events/4
year and category ID together:  http://example.com/events/2010/4


Now the problem is that in the second case, as the argument is considered a year.

How can I set the view to be able to use a URL as in the second case?
As @googletorp commented, the argument in the url have to keep a certain order if not Views won't know which kind it is. The recommended method for this is allowing a "wildcard" by providing an exception, in views you can configure this in the contextual filter options:

Then you simply put all instead of the year when not it's not available:
2- the category id alone : http://mydomain.com/events/all/4