don’t redirect to URLs with trailing slashes

This commit is contained in:
Sami Samhuri 2016-03-28 16:54:51 -07:00
parent 07305daee4
commit 73ea651f9f

View file

@ -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