User friendly URL for pagination and sorting

I’m trying to make my pagination and sorting in the url more friendly looking. currently my url looks like this

how do i make it look like this

https// or

https// (to hide my column name)

currently i have this in my main.php just for page

'user/dashboard/page/<page:\d+>' => 'user/dashboard'

but this doesn’t work. Thanks

        'rules' => [
				'pattern' => '/user/dashboard/<page:\d+>/<sort:\w+>',
				'route' => 'user/dashboard',
				'defaults' => ['page' => 1, 'sort' => ''],

thanks. It kind of works tho. when i sort it and click on pagination it works. but when i sort is back to default i get a 404

when i sort i get this

when i unsort the link is

Change this row
‘pattern’ => ‘/user/dashboard/page:\d+/sort:[\w\-]+’,
(this will accept a hyphen)

Sorry for the confusion. I changed the pattern to your controller/action.