From 4ccb0bc8585ebbb1c45138dd015542e2d413bae1 Mon Sep 17 00:00:00 2001 From: muskie9 Date: Tue, 17 Feb 2015 16:28:02 -0600 Subject: [PATCH] Update Common Problems with mod_rewrite issue --- .../01_Installation/05_Common_Problems.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/docs/en/00_Getting_Started/01_Installation/05_Common_Problems.md b/docs/en/00_Getting_Started/01_Installation/05_Common_Problems.md index 2a5270594..ebfed3a73 100644 --- a/docs/en/00_Getting_Started/01_Installation/05_Common_Problems.md +++ b/docs/en/00_Getting_Started/01_Installation/05_Common_Problems.md @@ -25,6 +25,20 @@ On "live" environments, the `?isDev=1` solution is preferred, as it means that y (and potentially security sensitive) PHP errors as well. +## mod_rewrite isn't working but it's installed (prior to SilverStripe 3.1.11) + +Due to some changes to `mod_dir` in [Apache 2.4](http://httpd.apache.org/docs/current/mod/mod_dir.html#DirectoryCheckHandler) (precedence of handlers), index.php gets added to the URLs as soon as you navigate to the homepage of your site. Further requests are then handled by index.php rather than `mod_rewrite` (framework/main.php). To fix this place the following within the `mod_rewrite` section of your .htaccess file: + +``` + + # Turn off index.php handling requests to the homepage fixes issue in apache >=2.4 + + DirectoryIndex disabled + +# ------ # + +``` + ## My templates don't update on page refresh Putting ?flush=1 on the end of any SilverStripe URL will clear out all cached content; this is a pretty common solution @@ -108,4 +122,4 @@ foreach($files as $name => $file){ $matched = true; } } -``` \ No newline at end of file +```