简体   繁体   English

禁用Ruby on Rails,正确索引到default.php

[英]Disable Ruby on Rails, correctly index to default.php

I've rewritten a site for a client in PHP, and their previous site was written in Ruby on Rails. 我已经用PHP重写了一个客户端站点,而他们以前的站点是用Ruby on Rails编写的。 I'm very unfamiliar with Ruby/Rails, so I'm not sure exactly how to replace the previous site on their host. 我对Ruby / Rails非常陌生,因此我不确定究竟如何替换其主机上的先前站点。 I've added "DirectoryIndex index.php" to the .htaccess file, but it doesn't seem to be working. 我已经在“ .htaccess”文件中添加了“ DirectoryIndex index.php”,但它似乎无法正常工作。 The site will correctly index to index.html, but I need the PHP parsed. 该网站将正确索引到index.html,但是我需要解析PHP。 The site host is HostingRails, so I don't have access to the httpd.conf file. 该站点主机是HostingRails,因此我无权访问httpd.conf文件。

So, my question is: How do I disable the old, Ruby site and get the site to correctly index the index.php file? 因此,我的问题是:如何禁用旧的Ruby站点并使站点正确索引index.php文件? It'd be acceptable to leave the Ruby on the site and just get it to correctly index the PHP files. 可以将Ruby留在网站上,然后让它正确地索引PHP文件是可以接受的。

Thanks very much. 非常感谢。 This site is a great resource. 该站点是一个很好的资源。

Check your apache configuration to verify that .htaccess files are allowed to override defaults. 检查您的apache配置,以验证是否允许.htaccess文件覆盖默认值。 Also look in the vhost for the particular domain. 还要在虚拟主机中查找特定域。 If you have a line that says "AllowOverride None" or something similar, this is a good place to start investigating as this tells apache to ignore .htaccess directives. 如果您有一行显示“ AllowOverride None”或类似内容,那么这是一个开始调查的好地方,因为这会告诉apache忽略.htaccess指令。 Also verify that the PHP module is enabled for apache, and you may consider disabling any ruby module and seeing what kind of errors are created, this may give you a clue as to whether ruby was interfering with the request. 还要验证是否为Apache启用了PHP模块,并且您可以考虑禁用任何ruby模块并查看产生了哪些类型的错误,这可能为您提供了Ruby是否正在干扰请求的线索。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 IIS上的PHP编码只有index.php或default.php可以直接访问 - Coding PHP on IIS only index.php or default.php can be accessed directly Joomla。 如何在default.php中编辑菜单的链接? - Joomla. How to edit the link of the Menu in default.php? 我的Concrete5页面类型将仅使用Default.php - My Concrete5 Page Types Will Only Use Default.php 在joomla组件中的default.php内部查看路径 - View path inside default.php in joomla component Joomla 2.5在default.php中加载javaScript文件 - Joomla 2.5 Loading javaScript Files inside default.php 从default.php隐藏的传递变量不起作用-joomla 3 - passing variable as hidden from default.php is not working - joomla 3 在Virtuemar选项卡/ default.php / Joomla 3.7.5中插入Chronoforms - Insert Chronoforms in Virtuemar tabs / default.php / Joomla 3.7.5 注意:未定义的偏移量:在第37行的default.php中为2注意:试图在第37行的default.php中获取非对象的属性找不到文件 - Notice: Undefined offset: 2 in default.php on line 37 Notice: Trying to get property of non-object in default.php on line 37 File not found 如何通过Ajax将default.php中的值传递给view.html.php-joomla3.x - How to pass a value from default.php to view.html.php through ajax - joomla3.x joomla 2.5模块:如何将foreach循环放入tmpl / default.php - joomla 2.5 module: how to foreach loop put in tmpl/default.php
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM