htaccess的为Symfony的共享主机 [英] htaccess for Symfony on Shared Hosting

查看:227
本文介绍了htaccess的为Symfony的共享主机的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试着去设置类似于共享主机本地环境。我复制了整个项目到htdocs目录,因此应用程序不会在默认情况下在web目录中启动。

Im trying to setup a local environment that resembles shared hosting. I have copied the entire project into the htdocs directory, and thus the application does not start by default in the web directory.

有关此,我发现这2个参考: http://oldforum.symfony-project.org/index.php/m/ 98117 / http://www.teamlalala.com/blog/2010/05/02/how-to-handle-symfony-on-shared-hosting/

For this I found these 2 references: http://oldforum.symfony-project.org/index.php/m/98117/ http://www.teamlalala.com/blog/2010/05/02/how-to-handle-symfony-on-shared-hosting/

不过,我有2个疑惑: 1.在帖子中提到的的.htaccess是Web文件夹里面添加,或在根文件夹 2.如果添加到根文件夹,我们应该在网络中删除默认的.htaccess?

But I have 2 doubts: 1. The .htaccess mentioned in the posts is to be added inside the WEB folder, or in the ROOT folder 2. If added to the ROOT folder, should we remove the default .HTACCESS in WEB?

在此先感谢

推荐答案

您应该将的.htaccess 文件中的 DOCUMENT_ROOT 文件夹。默认情况下在symfony的是 sf_project_dir /网络

You should place .htaccess file in your DOCUMENT_ROOT folder. By default in symfony it is sf_project_dir/web.

这篇关于htaccess的为Symfony的共享主机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆