Use Rails\' routing, for a URL like https://www.amazon.com/posts/1, can use this way to do
https://www.amazon.com/posts/1
get \'posts/:url\', to: \'posts#search\', constraints: