From 73ea651f9fc3d8f2e7b909c912f822edf2540b20 Mon Sep 17 00:00:00 2001 From: Sami Samhuri Date: Mon, 28 Mar 2016 16:54:51 -0700 Subject: [PATCH] =?UTF-8?q?don=E2=80=99t=20redirect=20to=20URLs=20with=20t?= =?UTF-8?q?railing=20slashes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/.htaccess | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/public/.htaccess b/public/.htaccess index 2a2a91a..c60a3ba 100644 --- a/public/.htaccess +++ b/public/.htaccess @@ -41,6 +41,13 @@ RewriteRule ^posts/([0-9][0-9][0-9][0-9])/([0-9])/[0-9][0-9]/(.*)$ /posts/$1/0$2 RewriteRule ^posts/([0-9][0-9][0-9][0-9])/([0-9][0-9])/[0-9]/(.*)$ /posts/$1/$2/$3 [R=301] RewriteRule ^posts/([0-9][0-9][0-9][0-9])/([0-9][0-9])/[0-9][0-9]/(.*)$ /posts/$1/$2/$3 [R=301] +# Don't redirect to URLs with trailing slashes (because everything from harp is a directory) +DirectorySlash Off +RewriteCond %{REQUEST_FILENAME} !/$ +RewriteCond %{REQUEST_FILENAME} -d +RewriteCond %{REQUEST_FILENAME}/index.html -f +RewriteRule ^(.*)$ $1/index.html [L] + # Never ended up running with this, give it back. Redirect 301 /json-diff http://tlrobinson.net/projects/javascript-fun/jsondiff