用于fastcgi的bluehost rails public/.htaccess

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了用于fastcgi的bluehost rails public/.htaccess相关的知识,希望对你有一定的参考价值。

  1. # General Apache options
  2. AddHandler fcgid-script .fcgi
  3. AddHandler cgi-script .cgi
  4. #Options +FollowSymLinks +ExecCGI
  5.  
  6. # If you don't want Rails to look in certain directories,
  7. # use the following rewrite rules so that Apache won't rewrite certain requests
  8. #
  9. # Example:
  10. # RewriteCond %{REQUEST_URI} ^/notrails.*
  11. # RewriteRule .* - [L]
  12.  
  13. # Redirect all requests not available on the filesystem to Rails
  14. # By default the cgi dispatcher is used which is very slow
  15. #
  16. # For better performance replace the dispatcher with the fastcgi one
  17. #
  18. # Example:
  19. # RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
  20. RewriteEngine On
  21.  
  22. # If your Rails application is accessed via an Alias directive,
  23. # then you MUST also set the RewriteBase in this htaccess file.
  24. #
  25. # Example:
  26. # Alias /myrailsapp /path/to/myrailsapp/public
  27. # RewriteBase /myrailsapp
  28.  
  29. #RewriteBase /
  30. RewriteRule ^$ index.html [QSA]
  31. RewriteRule ^([^.]+)$ $1.html [QSA]
  32. RewriteCond %{REQUEST_FILENAME} !-f
  33. RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
  34.  
  35. # In case Rails experiences terminal errors
  36. # Instead of displaying this message you can supply a file here which will be rendered instead
  37. #
  38. # Example:
  39. # ErrorDocument 500 /500.html
  40.  
  41. ErrorDocument 500 "<h2>Application error</h2>Rails application failed to start properly"

以上是关于用于fastcgi的bluehost rails public/.htaccess的主要内容,如果未能解决你的问题,请参考以下文章

什么是好的 Ruby on Rails 和 PHP 托管? [关闭]

BlueHost云虚拟主机到底适用于哪些企业?

XAMPP:Phpmyadmin 不适用于 FastCGI

双十二将至Bluehost优惠强力来袭

BlueHost服务器的几大优势?

BlueHost服务器的几大优势?