From ad3b8d7bcf89454e5567378f3d2771de8c9dc027 Mon Sep 17 00:00:00 2001
From: Igor Minar
Date: Tue, 19 Jul 2011 16:58:40 -0700
Subject: chore(docs/.htaccess): bundle .htaccess with docs
---
docs/src/templates/.htaccess | 57 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 57 insertions(+)
create mode 100644 docs/src/templates/.htaccess
(limited to 'docs/src/templates')
diff --git a/docs/src/templates/.htaccess b/docs/src/templates/.htaccess
new file mode 100644
index 00000000..929e04b2
--- /dev/null
+++ b/docs/src/templates/.htaccess
@@ -0,0 +1,57 @@
+Options +Indexes
+IndexIgnore favicon.ico
+RewriteEngine on
+
+# Enable Crawling of AJAX apps.
+# See: http://code.google.com/web/ajaxcrawling/docs/getting-started.html
+RewriteCond %{QUERY_STRING} ^_escaped_fragment_=\/(.*)$
+RewriteRule ^(.*)$ /$1/%1.html?
+
+# Map versiond angular files to root folder.
+RewriteRule ^angular([\-\w]+)(\d+\.\d+\.\d+)(.*)$ /$2/angular$1$2$3
+# Map 1.2.3/docs to 1.2.3/docs-1.2.3/ so that we don't need the version in the URL twice
+RewriteRule ^(\d+\.\d+\.\d+)/docs/(.*)$ /$1/docs-$1/$2
+
+# If the user has forgot the trailing slash than add it through redirect
+RewriteRule ^latest$ /latest/ [R]
+RewriteRule ^latest/docs$ /latest/docs/ [R]
+
+# To change the latest version just change this line.
+# IMPORTANT: the order of lines matters, do not move to top!
+RewriteRule ^latest/(.*)$ /0.9.17/$1
+
+# If the request comes on http://docs.angularjs.org then point it to latest/docs
+RewriteCond %{HTTP_HOST} ^docs\.angularjs\.org$
+RewriteCond %{REQUEST_URI} !^/\d+\.\d+\.\d+
+RewriteCond %{REQUEST_URI} !^/latest
+RewriteCond %{REQUEST_URI} !^/angular-
+RewriteCond %{REQUEST_URI} !^/favicon.ico
+RewriteRule ^(.*)$ /latest/docs/$1
+
+## PERFORMANCE ##
+
+ExpiresActive On
+
+# cache js files for one year
+
+ExpiresDefault "access plus 1 year"
+
+
+# don't cache appcache manifests
+
+ExpiresDefault "access"
+
+
+# cache everything else for 1h
+ExpiresDefault "access plus 60 minutes"
+
+
+# compression
+SetOutputFilter DEFLATE
+Header set Vary "Accept-Encoding"
+
+
+# content types
+AddType application/javascript js
+AddType text/cache-manifest .manifest
+
--
cgit v1.2.3