Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # General Apache options
- AddHandler fastcgi-script .fcgi
- AddHandler cgi-script .cgi
- Options +FollowSymLinks +ExecCGI
- # 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]
- # Redirect all requests not available on the filesystem to Rails
- # By default the cgi dispatcher is used which is very slow
- #
- # For better performance replace the dispatcher with the fastcgi one
- #
- # Example:
- # RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
- RewriteEngine On
- # Apache redirects some of Mephistos URL’s with a trailing slash
- # because the cached directory structure on the server makes Apache
- # think you are requesting a directory. This works with GET requests,
- # but most clients, including IE and Firefox will *wrongly* handle a
- # POST redirect with a GET to the new url, which generates the exception.
- DirectorySlash Off
- # 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
- RewriteRule ^(.*)$ dispatch.cgi [QSA,L]
- RewriteRule ^/assets/(\d+)/(.+)$ /assets/%{HTTP_HOST}/$1/$2 [L]
- # Rewrite index to check for static
- # RewriteRule ^/$ /index.html [QSA]
- RewriteRule ^/$ /index.html [QSA]
- # Rewrite to check for Rails cached page
- # RewriteRule ^([^.]+)$ $1.html [QSA]
- RewriteRule ^/(.*)$ /cache/%{HTTP_HOST}/$1 [QSA]
- RewriteRule ^(.*)/([^.]*)$ $1/$2.html [QSA]
- # Redirect all non-static requests to cluster
- RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f
- RewriteRule ^/(.*)$ balancer://publishwithimpunity_cluster%{REQUEST_URI} [P,QSA,L]
- # In case Rails experiences terminal errors
- # 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"
Add Comment
Please, Sign In to add comment