如何编辑的.htaccess部署Zend的项目对服务器的过程?(How to edit .htaccess in process of deployment of zend project on server)

   IT问题网   2018-11-25 00:00:00

问 题

我想部署在服务器上的网站(http://webdeveloper.md)开发使用zend framework。当我进入文件管理器在我的账户上的服务器有显示结构如下:

anon_ftp
cgi-bin目录
conf
在error_docs

httpdocs资料
和其他目录。

我部署我的项目在httpdocs资料,所以访问它时,也将显示标准的zend结构(设置,应用程序,数据等)。据我了解的路径,我的网站主目录是 http://webdeveloper.md/httpdocs/public/的index.php 。我试着在主机设置插入这条路径到文档根目录。现在,当我访问webdeveloper.md在浏览器中,我得到错误404(未找到)。

我认为这个问题是在我的.htaccess文件。我没有什么改变了它,它包含标准的code:

rewriteengine叙述上
的rewritecond%{} request_filename -s [or]
的rewritecond%{} request_filename -l [or]
的rewritecond%{} request_filename -d
。重写规则^ * $-[nc,l]
重写规则^ * $的index.php [nc,l]
 

我tryed修改它 - 增加了一个行:

 的rewritebase / httpdocs资料/公
 

那么这样的:

 的rewritebase http://webdeveloper.md/httpdocs/public
 

那么这个,而不是最后一行:

 重写规则http://webdeveloper.md/httpdocs/public
 

没有什么工作!

我的configuraion.ini loks是这样的:

[制作]
resources.cachemanager.database.frontend.name =核心
resources.cachemanager.database.frontend.options.lifetime = 7200
resources.cachemanager.database.frontend.options.automatic_serialization =真
resources.cachemanager.database.backend.name =文件
resources.cachemanager.database.backend.options.cache_dir = application_path"/../data/cache"
resources.cachemanager.database.frontendbackendautoload = false
phpsettings.display_startup_errors = 0
phpsettings.display_errors = 0
includepaths.library = application_path"/../library"
bootstrap.path = application_path"/bootstrap.php"
bootstrap.class ="引导"
appnamespace ="应用程序"
resources.frontcontroller.controllerdirectory = application_path"/控制器"
resources.frontcontroller.params.displayexceptions = 0
resources.layout.layoutpath = application_path"/布局/脚本/"
resources.view [] =
resources.db.adapter ="pdo_mysql"
resources.db.isdefaulttableadapter =真
resources.db.params.dbname ="数据库"
resources.db.params.charset ="utf8"
resources.db.params.host ="本地主机"
resources.db.params.username ="根"
resources.db.params.password ="***********"
resources.session.save_path = application_path"/../data/sessions"
resources.session.use_only_cookies =真

date.timezone ="欧洲/基希讷乌"

[分期:生产]

[测试:制作]
phpsettings.display_startup_errors = 1
phpsettings.display_errors = 1

resources.db.adapter ="pdo_mysql"
resources.db.params.dbname ="数据库"
resources.db.params.charset ="utf8"
resources.db.params.host ="本地主机"
resources.db.params.username ="根"
resources.db.params.password ="*********"
[发展:生产]
phpsettings.display_startup_errors = 1
phpsettings.display_errors = 1
resources.frontcontroller.params.displayexceptions = 1

resources.db.adapter ="pdo_mysql"
resources.db.params.dbname ="数据库"
resources.db.params.charset ="utf8"
resources.db.params.host ="本地主机"
resources.db.params.username ="根"
resources.db.params.password ="*********"
 
解决方案

我已经解决了所有问题。其实,我让的.htaccess和index.php的文件,因为它们。当我从其他用户的体验的理解,编辑.htaccess中的必要性出现在情况下,当服务器不允许修改文档根目录(最常见的情况 - 共享主机)。这不是我的情况,所以我不得不做的是在服务器上修改php设置。 我已经做了以下的服务器在php中设置的修改: 1.我改变文档根目录指向我的公用文件夹(在我的情况/ httpdocs资料/公/); 在服务器上的php设置2.最初的open_basedir被root:/ tmp目录(或某事),我已经改变了这个值默认值; 3.我修改php设置session.save_path的从我的zend项目中插入了那里的路径会话目录。 最后我不得不删除所有文件,并重新部署我的项目。 要解决所有的问题,我从服务器检讨错误日志。祝你好运!

标签:如何编辑编纂部署项目对于服务器过程进程



分享:

  • 微信
  • QQ好友
  • QQ空间
  • 新浪微博


热门推荐

codeIgniter的mod_rewrite提供404错误(CodeIgniter mod_rewrite gives 404 error)

problem i have written a codeigniter application and i wa ...

htaccess的重写/富/酒吧/到/foo/bar.php(.htaccess rewrite /foo/bar/ to /foo/bar.php)

problem i'm looking to set rules in my .htaccess file so ...

prevent访问PHP页面(Prevent access to php pages)

problem ok, so i have set the .htaccess like so: options ...

无法获取URL的第二个参数在.htaccess的重写规则(Unable to get the 2nd Parameters of URL in Rewrite rule of .htaccess)

problem i am having another problem in getting 2nd get pa ...

htacces隐藏PHP和HTML的一些推广(htacces to hide both php and html extentions)

problem what lines shoul i add to remove both html and ph ...

如何从URL中删除网页的扩展?(How to remove webpage extension from URL)

problem i want to remove webpage extension from url,someb ...

删除重复通过的.htaccess或PHP斜线的网址(Removing duplicate slashes in URL via .htaccess or PHP)

problem i'm trying to remove duplicate slashes from urls. ...

Apache的htaccess的地图第一段为参数,而不会干扰其他参数(apache htaccess map first segment as parameter without disturbing other parameters)

problem this is might be a classic .htaccess ...

如何获得数据由$ _GET在PHP,当我使用的.htaccess(How to get data by $_GET on php, when i used .htaccess)

problem i have one problem on my small sites, the problem ...

URL重定向到一个IP地址(Redirect URL to a IP address)

problem i need to redirect a url www.website.com/page to ...

codeigniter网站404错误/的.htaccess(Codeigniter website 404 error / .htaccess)

problem i'm trying with codeigniter, i build a small web ...

如何加密URL中的产品标识(How to encrypt product ID in URL)

problem i have a database with just over 800 data. produ ...

PHP的mod_rewrite的工作不正常(Php mod_rewrite is not working properly)

problem i've a php page with following link structure: ...

使用的.htaccess重定向URL在网址(Redirect one url to another url using .htaccess)

problem as i am trying to redirect one comple ...

重定向的.php没有.PHP(Redirect .php to no .php)

problem i have this in my htaccess file rewriteengine on ...

重写不工作?(Rewrite doesn't work)

problem i am trying to write a rewritrule in ...

重写规则工作不正常?(RewriteRule not working as expected)

problem i am trying to implement a front controller. so i ...

文件夹内隐藏网/ app.php只需用的.htaccess Symfony2的项目(Symfony2 project inside folder hide web/app.php just with .htaccess)

problem i have help-desk project made using symfony2 and ...

我用的手机网站和放大器;创建子域,但在手机没有工作,这是我的.htaccess文件(i used mobile website & create subdomain but not worked in mobile this is my .htaccess file)

problem this is my auto generated htaccess file rewrite ...

HTTPS非WWW到https WWW(https non www to https www)

problem i rewrite all non-www requests to www ...