Permalink
Browse files

Reminder for dangers with Alias and mod_rewrite #1752 [dave@cherryvil…

…le.org]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1846 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
dhh committed Jul 17, 2005
1 parent d2d38f6 commit b66b1fff1211ca015bf80d9c105270f195cb8a44
Showing with 8 additions and 0 deletions.
  1. +8 −0 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

0 comments on commit b66b1ff

Please sign in to comment.