My project home page URL is http://localhost/lcode/web/app_dev.php
Then all URLs accessed by {{ path('abc') }} will have localhost/lcode/web/app_dev.php
This paragraph
Now I want to use gzl to replace this
For example, the home page access is http://gzl
It’s ok.
os: windows 7
server: nginx
1. Configure nginx
Create a new virtual host in the nginx.conf file. The configuration code is as follows:
2. Configure hosts file
Under Windows, use Notepad to open the C:WindowsSystem32driversetchosts file and add a line
Under ubuntu, vim /etc/hosts
It’s OK.
In this way, you can use www.caiwen.org to access the website in Browser without adding /codes/web/app_dev.php at the end.
You can refer to my configuration file to complete your configuration. Pay attention to the amazing path.