From 8cf99b9becef0a4c4df29bad680281ea11fd96f0 Mon Sep 17 00:00:00 2001 From: Sean Harvey Date: Mon, 18 Aug 2014 10:43:39 +1200 Subject: [PATCH] Fixing inconsistent use of RewriteRule in docs and install.php5 It currently doesn't match the .htaccess that comes with a checkout of silverstripe-installer. --- dev/install/install.php5 | 2 +- docs/en/reference/execution-pipeline.md | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/dev/install/install.php5 b/dev/install/install.php5 index 7602f1a4e..0d34d2d2b 100755 --- a/dev/install/install.php5 +++ b/dev/install/install.php5 @@ -1528,7 +1528,7 @@ ErrorDocument 500 /assets/error-500.html RewriteCond %{REQUEST_URI} ^(.*)$ RewriteCond %{REQUEST_FILENAME} !-f - RewriteRule .* $modulePath/main.php?url=%1&%{QUERY_STRING} [L] + RewriteRule .* $modulePath/main.php?url=%1 [QSA] TEXT; diff --git a/docs/en/reference/execution-pipeline.md b/docs/en/reference/execution-pipeline.md index 00184f18d..7359a8a3e 100644 --- a/docs/en/reference/execution-pipeline.md +++ b/docs/en/reference/execution-pipeline.md @@ -9,7 +9,7 @@ This page documents all the steps from an URL request to the delivered page. Silverstripe uses **[mod_rewrite](http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html)** to deal with page requests. So instead of having your normal everyday `index.php` file which tells all, you need to look elsewhere. -The basic .htaccess file after installing SilverStripe look like this: +The basic .htaccess file after installing SilverStripe looks like this: ### SILVERSTRIPE START ### @@ -23,11 +23,13 @@ The basic .htaccess file after installing SilverStripe look like this: RewriteEngine On - RewriteCond %{REQUEST_URI} !(\.gif$)|(\.jpg$)|(\.png$)|(\.css$)|(\.js$) + RewriteRule ^vendor(/|$) - [F,L,NC] + RewriteRule silverstripe-cache(/|$) - [F,L,NC] + RewriteRule composer\.(json|lock) - [F,L,NC] RewriteCond %{REQUEST_URI} ^(.*)$ RewriteCond %{REQUEST_FILENAME} !-f - RewriteRule .* framework/main.php?url=%1&%{QUERY_STRING} [L] + RewriteRule .* framework/main.php?url=%1 [QSA] ### SILVERSTRIPE END ###