简体   繁体   中英

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. I'm very unfamiliar with Ruby/Rails, so I'm not sure exactly how to replace the previous site on their host. I've added "DirectoryIndex index.php" to the .htaccess file, but it doesn't seem to be working. The site will correctly index to index.html, but I need the PHP parsed. The site host is HostingRails, so I don't have access to the httpd.conf file.

So, my question is: How do I disable the old, Ruby site and get the site to correctly index the index.php file? It'd be acceptable to leave the Ruby on the site and just get it to correctly index the PHP files.

Thanks very much. This site is a great resource.

Check your apache configuration to verify that .htaccess files are allowed to override defaults. 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. 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM