Routing not working in Symfony 3.4

前端 未结 4 2012
盖世英雄少女心
盖世英雄少女心 2021-01-18 22:03

I have created a new Symfony 3.4 project using:

composer create-project symfony/skeleton my-project

After that I added the following compo

4条回答
  •  终归单人心
    2021-01-18 22:31

    Sounds like you need to setup your RewriteBase with apache, since the problem is not at /

    Maybe .htaccess file is even missing since you are using Symfony/flex, and it doesn't add it by default like previous Symfony editions.

    Check this page to configure a Web Server

    .htaccess should be inside public folder and The minimum configuration to get your application running under Apache is:

    
        ServerName domain.tld
        ServerAlias www.domain.tld
    
        DocumentRoot /var/www/project/public
        
            AllowOverride All
            Order Allow,Deny
            Allow from All
        
    
        # uncomment the following lines if you install assets as symlinks
        # or run into problems when compiling LESS/Sass/CoffeeScript assets
        # 
        #     Options FollowSymlinks
        # 
    
        ErrorLog /var/log/apache2/project_error.log
        CustomLog /var/log/apache2/project_access.log combined
    
    

提交回复
热议问题