[英]Remove slug name from url locomotivecms
How can I remove slug name from URL? 如何从网址中删除子弹名称? I have URL with parent page: 我的网址带有父页面:
host_url/home/index
but I need this to be as 但我需要这样
host_url/index #without parent slug name
您可以简单地将routes
更改为:
match '/index', :to => 'home#index', via: [:get]
If using resources
in routes
. 如果在routes
使用resources
。
resources :users, path: '/'
get '/index' => 'home#index'
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.