Drupal views contextual filter: use last argument as filter value
One solution would be hook_views_pre_view()

function MYMODULE_views_pre_view(&amp;$view, &amp;$display_id, &amp;$args) {
    if ($view-&gt;name == 'view_machine_name' &amp;&amp; $display_id == 'my_display_id') {
        $args = array(end($args));
    }
}


For a view with one contextual filter this would always set the argument to the last argument from the URL.