diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-02-21 01:01:24 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-02-21 01:01:24 +0000 |
commit | 48a44b77c138826e9ffaecd6fc63627d3f670086 (patch) | |
tree | f8228141bde6559a93c2ad3281c3db0519678d7f /railties | |
parent | 824558816acb7b930624e3cbd4dae8e7413e12f4 (diff) | |
download | rails-48a44b77c138826e9ffaecd6fc63627d3f670086.tar.gz rails-48a44b77c138826e9ffaecd6fc63627d3f670086.tar.bz2 rails-48a44b77c138826e9ffaecd6fc63627d3f670086.zip |
Fixed caching for root and Routing for getting back the current url
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@727 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties')
-rw-r--r-- | railties/README | 10 | ||||
-rwxr-xr-x | railties/configs/apache.conf | 2 |
2 files changed, 8 insertions, 4 deletions
diff --git a/railties/README b/railties/README index cedb61ce21..49f82b54c1 100644 --- a/railties/README +++ b/railties/README @@ -71,11 +71,10 @@ server.port = 8080 server.bind = "127.0.0.1" # server.event-handler = "freebsd-kqueue" # needed on OS X -server.modules = ( "mod_rewrite", "mod_access", "mod_fastcgi" ) +server.modules = ( "mod_rewrite", "mod_fastcgi" ) -server.indexfiles = ( "index.html" ) -url.rewrite = ( "^([^.]+)$" => "$1.html" ) -server.error-handler-404 = "/dispatch.fcgi" # change to dispatch.cgi to run CGI +url.rewrite = ( "^/$" => "index.html", "^([^.]+)$" => "$1.html" ) +server.error-handler-404 = "/dispatch.fcgi" server.document-root = "/path/application/public" server.errorlog = "/path/application/log/server.log" @@ -169,6 +168,9 @@ app/helpers config Configuration files for Apache, database, and other dependencies. +components + Self-contained mini-applications that can bundle controllers, models, and views together. + lib Application specific libraries. Basically, any kind of custom code that doesn't belong controllers, models, or helpers. This directory is in the load path. diff --git a/railties/configs/apache.conf b/railties/configs/apache.conf index 28c4c57aad..499477c57b 100755 --- a/railties/configs/apache.conf +++ b/railties/configs/apache.conf @@ -5,6 +5,8 @@ Options +FollowSymLinks +ExecCGI # Redirect all requests not available on the filesystem to Rails RewriteEngine On +RewriteRule ^$ index.html [QSA] +RewriteRule ^([^.]+)$ $1.html [QSA] RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ /dispatch.cgi?$1 [QSA,L] |