Refactor action ?a=x to /x