我的urlManager
配置如下:
'urlManager' => [
'enablePrettyUrl' => true,
'showScriptName' => false,
'rules' => [
'<lang>/<p_page>/<p_category>/<p_product>' => 'splitter/manage-request',
'<lang>/<p_page>/<p_category>' => 'splitter/manage-request',
'<lang>/<p_page>' => 'splitter/manage-request',
'<lang>/' => 'splitter/manage-request',
'<lang>' => 'splitter/manage-request',
'' => 'splitter/manage-request',
],
],
例如,我的网址看起来像www.example.com/bg/page-44/product-22
。所有请求的url都将通过此SpliiterController/actionManageRequest
,从而构造另一个url-www.example.com/bg/page-44/product-22
并执行适当的视图(例如PageController/actionProduct
)。如何disallow
这样的页面?如果我有两种语言的购物车网址,例如../bg/количка-22
和../en/cart-22
是
Disallow: /bg/количка-22
Disallow: /en/cart-22
是正确的方法吗?谢谢!