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