From d22a69b51079a9c6bfb641496ec78cb1043c8dfc Mon Sep 17 00:00:00 2001 From: Abijah Date: Sat, 16 Feb 2013 00:10:48 +0000 Subject: [PATCH] Fix for annoying 400 error from apache on lunarpages when the requested url is a top level request without a trailing slash. git-svn-id: file:///svn-source/pmgr/branches/hosted_migration_20130215@1025 97e9348a-65ac-dc4b-aefc-98561f571b83 --- site/.htaccess | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/site/.htaccess b/site/.htaccess index 2b45f17..9158f41 100644 --- a/site/.htaccess +++ b/site/.htaccess @@ -1,9 +1,18 @@ - RewriteEngine on - RewriteRule ^$ webroot/ [L] - RewriteRule (.*) webroot/$1 [L] + RewriteEngine on + + RewriteRule ^$ webroot/ [L] + + # Need this prevent a 400 error without trailing / + RewriteCond %{REQUEST_FILENAME} !-d + RewriteRule (.*) webroot/$1 [L] + +# Need to make sure directories can't be listed, since the rewrite +# rule excludes rewriting when an actual directory is requested +Options -Indexes + # Provide a mechanism for user authentication AuthType Basic AuthName "Valley Storage"