I have custom post type (portfolio) with two different categories, then I have 2 pages showing posts from each of both categories.

The url when I call the page is something like mysite.com/pagename where pagename has the same name of the portfolio category.

My problem is when I go in the single portfolio the url changes into mysite.com/portfolio/portfolio-name

Is there any way to show the portfolio category in the url instead?
It should be like mysite.com/portfolio-category/portfolio-name

Thanks in advance.