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
上级 0b6fe224
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册