我在我的routing.yml文件的簡單redirectt:Symfony2的301重定向不改變URL
products_in_categories:
path: /{slug}
defaults: { _controller: MpShopBundle:Category:show }
redirect_category:
path: /112-redirect-this
defaults:
_controller: MpShopBundle:Category:show
route: products_in_categories
slug: to-this
permanent: true
所以,當我去localhost/web/app_dev.php/112-redirect-this
它應該做301重定向並更改網址...它加載頁面成功,但網址沒有改變。它顯示:
localhost/web/app_dev.php/112-redirect-this
當它應該顯示: localhost/web/app_dev.php/to-this
難道我做錯了什麼?
[重定向(301)一個從routing.yml中的路由到另一個可能的複製在Symfony2](http://stackoverflow.com/questions/8529038/redirect-301-one-route-to-another-from-routing-yml-in-symfony2) – hchr