开发者

recently switched from PHP to Rails Passenger. Can't make index.php redirect to /

开发者 https://www.devze.com 2023-03-23 14:35 出处:网络
Rails 3 on phusion passenger with apache on development server in routes.rb match \"/index.php\" => redirect(\"/\")

Rails 3 on phusion passenger with apache on development server in routes.rb

match "/index.php" => redirect("/")

works fine. In production it throws a 404 and its an Apache 404 page not a Rails 404 page Took out DirectoryIndex from httpd.conf and .htaccess. If you make a redirect like /sub/i开发者_运维知识库ndex.php it works fine just not in the root.

Anyone know what the problem could be or how to work around? I am afraid people have bookmarked index.php


Instead of redirecting, does it work if you just point index.php straight at the root controller/action?

match "/index.php" => "welcome#index"
0

精彩评论

暂无评论...
验证码 换一张
取 消