From b66b1fff1211ca015bf80d9c105270f195cb8a44 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sun, 17 Jul 2005 09:22:19 +0000 Subject: [PATCH] Reminder for dangers with Alias and mod_rewrite #1752 [dave@cherryville.org] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1846 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- railties/configs/apache.conf | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/railties/configs/apache.conf b/railties/configs/apache.conf index fe68ae5d42..d3c9983451 100755 --- a/railties/configs/apache.conf +++ b/railties/configs/apache.conf @@ -18,6 +18,14 @@ Options +FollowSymLinks +ExecCGI # Example: # RewriteRule ^(.*)$ dispatch.fcgi [QSA,L] RewriteEngine On + +# 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 ^$ index.html [QSA] RewriteRule ^([^.]+)$ $1.html [QSA] RewriteCond %{REQUEST_FILENAME} !-f