You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by hb...@apache.org on 2015/03/30 19:35:09 UTC

svn commit: r1670151 - /maven/site/trunk/content/filtered-resources/.htaccess

Author: hboutemy
Date: Mon Mar 30 17:35:08 2015
New Revision: 1670151

URL: http://svn.apache.org/r1670151
Log:
added Joes trick to avoid httpd redirect from /foo (no trailing / ) to /components/foo/ but do a redirect to /foo/

Modified:
    maven/site/trunk/content/filtered-resources/.htaccess

Modified: maven/site/trunk/content/filtered-resources/.htaccess
URL: http://svn.apache.org/viewvc/maven/site/trunk/content/filtered-resources/.htaccess?rev=1670151&r1=1670150&r2=1670151&view=diff
==============================================================================
--- maven/site/trunk/content/filtered-resources/.htaccess (original)
+++ maven/site/trunk/content/filtered-resources/.htaccess Mon Mar 30 17:35:08 2015
@@ -80,4 +80,10 @@ RewriteRule ^core-its-htaccess(.*)$ /com
 RewriteCond %{REQUEST_URI} !^/components/
 RewriteCond %{REQUEST_FILENAME} !-f
 RewriteCond %{REQUEST_FILENAME} !-d
-RewriteRule ^(.*)$ /components/$1 [L]
+RewriteRule ^(.*)$ /components/$1
+
+# in case of directory without trailing /, do the redirect or httpd will do it to /components/foo/
+RewriteCond %{REQUEST_URI} ^/components/
+RewriteCond %{REQUEST_FILENAME} -d
+RewriteCond %{REQUEST_URI} !/$
+RewriteRule /components/(.*) $1/ [R]