質問が単純であるため、宝石の使用を避けようとしています。
私のウェブサイトには次の ?params= があります
"type" just filters by type. if this isnt specified they're all lumped together
"sort" sorts by date/whats hot/latest
"view" changes compact view/list view
"scroll" isnt even used yet, its for infinite scroll on or off which i havent put in yet
"reset" is a link when you click the logo (not the home link) that resets all session params to "all" and "whats hot" (the default)
"page" is the pagination which i think is the only really important one
?page=
いくつかの助けを得た後、ページネーションを除いて、すべてのコンテンツにクエリパラメーターなしでアクセスできるため、唯一の本当に重要なものであると通知されました。
だから今私はこれを持っています:
<link rel="canonical" href="<%= "http://#{request.host + request.fullpath}" %>">
だから私の質問は、これを変更してURLのみを配置し、存在する場合は ?page= を配置するが、他のすべてのパラメーターを無視するようにするにはどうすればよいですか?