Project

General

Profile

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
<IfModule mod_cgi.c>
9
	AddHandler cgi-script .cgi
10
</IfModule>
11
Options +FollowSymLinks +ExecCGI
12

    
13
# If you don't want Rails to look in certain directories,
14
# use the following rewrite rules so that Apache won't rewrite certain requests
15
# 
16
# Example:
17
#   RewriteCond %{REQUEST_URI} ^/notrails.*
18
#   RewriteRule .* - [L]
19

    
20
# Redirect all requests not available on the filesystem to Rails
21
# By default the cgi dispatcher is used which is very slow
22
# 
23
# For better performance replace the dispatcher with the fastcgi one
24
#
25
# Example:
26
#   RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
27
RewriteEngine On
28

    
29
# If your Rails application is accessed via an Alias directive,
30
# then you MUST also set the RewriteBase in this htaccess file.
31
#
32
# Example:
33
#   Alias /myrailsapp /path/to/myrailsapp/public
34
#   RewriteBase /myrailsapp
35

    
36
RewriteRule ^$ index.html [QSA]
37
RewriteRule ^([^.]+)$ $1.html [QSA]
38
RewriteCond %{REQUEST_FILENAME} !-f
39
<IfModule mod_fastcgi.c>
40
	RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
41
</IfModule>
42
<IfModule mod_fcgid.c>
43
	RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
44
</IfModule>
45
<IfModule mod_cgi.c>
46
	RewriteRule ^(.*)$ dispatch.cgi [QSA,L]
47
</IfModule>
48

    
49
# In case Rails experiences terminal errors
50
# Instead of displaying this message you can supply a file here which will be rendered instead
51
# 
52
# Example:
53
#   ErrorDocument 500 /500.html
54

    
55
ErrorDocument 500 "<h2>Application error</h2>Rails application failed to start properly"
(1-1/7)