You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

htaccess.fcgi.example 1.4KB

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