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