Chris@909: # General Apache options
Chris@909:
Chris@909: AddHandler fastcgi-script .fcgi
Chris@909:
Chris@909:
Chris@909: AddHandler fcgid-script .fcgi
Chris@909:
Chris@909:
Chris@909: AddHandler cgi-script .cgi
Chris@909:
Chris@909: Options +FollowSymLinks +ExecCGI
Chris@909:
Chris@909: # If you don't want Rails to look in certain directories,
Chris@909: # use the following rewrite rules so that Apache won't rewrite certain requests
Chris@909: #
Chris@909: # Example:
Chris@909: # RewriteCond %{REQUEST_URI} ^/notrails.*
Chris@909: # RewriteRule .* - [L]
Chris@909:
Chris@909: # Redirect all requests not available on the filesystem to Rails
Chris@909: # By default the cgi dispatcher is used which is very slow
Chris@909: #
Chris@909: # For better performance replace the dispatcher with the fastcgi one
Chris@909: #
Chris@909: # Example:
Chris@909: # RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
Chris@909: RewriteEngine On
Chris@909:
Chris@909: # If your Rails application is accessed via an Alias directive,
Chris@909: # then you MUST also set the RewriteBase in this htaccess file.
Chris@909: #
Chris@909: # Example:
Chris@909: # Alias /myrailsapp /path/to/myrailsapp/public
Chris@909: # RewriteBase /myrailsapp
Chris@909:
Chris@909: RewriteRule ^$ index.html [QSA]
Chris@909: RewriteRule ^([^.]+)$ $1.html [QSA]
Chris@909: RewriteCond %{REQUEST_FILENAME} !-f
Chris@909:
Chris@909: RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
Chris@909:
Chris@909:
Chris@909: RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
Chris@909:
Chris@909:
Chris@909: RewriteRule ^(.*)$ dispatch.cgi [QSA,L]
Chris@909:
Chris@909:
Chris@909: # In case Rails experiences terminal errors
Chris@909: # Instead of displaying this message you can supply a file here which will be rendered instead
Chris@909: #
Chris@909: # Example:
Chris@909: # ErrorDocument 500 /500.html
Chris@909:
Chris@909: ErrorDocument 500 "
Application error
Rails application failed to start properly"