Deploying Symfony 2.5.3 website to production server

后端 未结 4 1252
渐次进展
渐次进展 2021-01-23 17:16

I have been working on a website in development environment built on top of Symfony framework and now it is time to deploy it to live site, in development environment we run the

4条回答
  •  既然无缘
    2021-01-23 17:50

    After following all the How to deploy a Symfony App, in the root of your Symfony application create .htaccess file and add the following code in it, this is what solved my problem.

    
    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^domain.com$ [NC,OR]
    RewriteCond %{HTTP_HOST} ^www.domain.com$
    RewriteCond %{REQUEST_URI} !web/
    RewriteRule (.*) /web/$1 [L]
    
    

提交回复
热议问题