Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我对 Symfony2 中的路线有疑问。
现在,我的网站在那里运行良好:
www.mywebsite.com/products
但是,我希望网络在那里运行良好,并且带有尾随 .php
www.mywebsite.com/products.php
我怎样才能用 Syfmony2 做到这一点?
尝试这个:
products: pattern: /products{ext} requirements: ext: "(\.php)?"
放入路线:
pattern: /products.php
如果不起作用,请检查 nginx/apache 设置