From 7145046493f122f26717149dcb03b8a1689b5c76 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sat, 8 Jan 2005 23:46:29 +0000 Subject: Added rewrite conditions needed for page caching to work git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@348 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- railties/configs/apache.conf | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'railties/configs') diff --git a/railties/configs/apache.conf b/railties/configs/apache.conf index 3da2844d66..592c7ef155 100755 --- a/railties/configs/apache.conf +++ b/railties/configs/apache.conf @@ -16,12 +16,18 @@ RewriteBase /dispatch.cgi RewriteRule ^([-_a-zA-Z0-9]+)$ /$1/ [R] # Default rewriting rules. +RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^([-_a-zA-Z0-9]+)/([-_a-zA-Z0-9]+)/([0-9]+)$ ?controller=$1&action=$2&id=$3 [QSA,L] +RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^([-_a-zA-Z0-9]+)/([-_a-zA-Z0-9]+)$ ?controller=$1&action=$2 [QSA,L] +RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^([-_a-zA-Z0-9]+)/$ ?controller=$1&action=index [QSA,L] +RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^([-_a-zA-Z0-9]+)/([-_a-zA-Z0-9]+)/([-_a-zA-Z0-9]+)/([0-9]+)$ ?module=$1&controller=$2&action=$3&id=$4 [QSA,L] +RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^([-_a-zA-Z0-9]+)/([-_a-zA-Z0-9]+)/([-_a-zA-Z0-9]+)$ ?module=$1&controller=$2&action=$3 [QSA,L] +RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^([-_a-zA-Z0-9]+)/([-_a-zA-Z0-9]+)/$ ?module=$1&controller=$2&action=index [QSA,L] # You can also point these error messages to a controller/action -- cgit v1.2.3