开发者

symfony routing.yml config for site folders

I have symfony web files in web root folder where the project is running. I have site files such as index.html, aboutus.html and contactus.html files. I have put these files into public_htm开发者_如何学编程l/site/ How to access these files by default using routing.yml? also project should run in index.php


Hm...If you want to add to your project some static pages, I would recommend you this method.I think this is the right way. For index.php ,well read this


Why don't you make a new module for static pages and move the html content into it? You have to understand that routing system in symfony is used for connect requested urls to controllers. So you can't use it to provide generating urls for static pages outside of your symfony application. That files are just like files of foreign site. So you can just use link_to('about us', $this->getRequest()->getHost().'/about_us.html');

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜