2005-02-15 18:34:21 -05:00
|
|
|
# General Apache options
|
|
|
|
AddHandler fastcgi-script .fcgi
|
|
|
|
AddHandler cgi-script .cgi
|
|
|
|
Options +FollowSymLinks +ExecCGI
|
|
|
|
|
2005-04-18 14:57:56 -04:00
|
|
|
# If you don't want Rails to look in certain directories,
|
|
|
|
# use the following rewrite rules so that Apache won't rewrite certain requests
|
|
|
|
#
|
|
|
|
# Example:
|
|
|
|
# RewriteCond %{REQUEST_URI} ^/notrails.*
|
|
|
|
# RewriteRule .* - [L]
|
|
|
|
|
2005-02-15 18:34:21 -05:00
|
|
|
# Redirect all requests not available on the filesystem to Rails
|
2005-03-20 17:02:22 -05:00
|
|
|
# By default the cgi dispatcher is used which is very slow
|
|
|
|
#
|
|
|
|
# For better performance replace the dispatcher with the fastcgi one
|
|
|
|
#
|
|
|
|
# Example:
|
2005-03-22 07:11:43 -05:00
|
|
|
# RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
|
2004-11-23 20:04:44 -05:00
|
|
|
RewriteEngine On
|
2005-07-17 05:22:19 -04:00
|
|
|
|
|
|
|
# If your Rails application is accessed via an Alias directive,
|
|
|
|
# then you MUST also set the RewriteBase in this htaccess file.
|
|
|
|
#
|
|
|
|
# Example:
|
|
|
|
# Alias /myrailsapp /path/to/myrailsapp/public
|
|
|
|
# RewriteBase /myrailsapp
|
|
|
|
|
2005-02-20 20:01:24 -05:00
|
|
|
RewriteRule ^$ index.html [QSA]
|
|
|
|
RewriteRule ^([^.]+)$ $1.html [QSA]
|
2005-02-14 20:45:35 -05:00
|
|
|
RewriteCond %{REQUEST_FILENAME} !-f
|
2005-03-22 07:11:43 -05:00
|
|
|
RewriteRule ^(.*)$ dispatch.cgi [QSA,L]
|
2004-11-25 17:07:29 -05:00
|
|
|
|
2005-02-15 18:34:21 -05:00
|
|
|
# In case Rails experiences terminal errors
|
2005-03-20 17:02:22 -05:00
|
|
|
# Instead of displaying this message you can supply a file here which will be rendered instead
|
|
|
|
#
|
|
|
|
# Example:
|
|
|
|
# ErrorDocument 500 /500.html
|
|
|
|
|
|
|
|
ErrorDocument 500 "<h2>Application error</h2>Rails application failed to start properly"
|